aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/schema-catalog.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/odb/schema-catalog.cxx b/odb/schema-catalog.cxx
index fb3ab82..1bdc112 100644
--- a/odb/schema-catalog.cxx
+++ b/odb/schema-catalog.cxx
@@ -267,6 +267,9 @@ namespace odb
schema_version i (db.schema_version (name));
+ if (i > v)
+ throw unknown_schema_version (i); // Database too new.
+
// If there is no schema, then "migrate" by creating it.
//
if (i == 0)