aboutsummaryrefslogtreecommitdiff
path: root/odb/schema-catalog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/schema-catalog.cxx')
-rw-r--r--odb/schema-catalog.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/schema-catalog.cxx b/odb/schema-catalog.cxx
index 946884f..1bdc112 100644
--- a/odb/schema-catalog.cxx
+++ b/odb/schema-catalog.cxx
@@ -1,5 +1,4 @@
// file : odb/schema-catalog.cxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <map>
@@ -268,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)