From 02f8e411774a5e77fef6fa4ea8b3604bad8c3d43 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Aug 2021 08:34:17 +0200 Subject: Throw unknown_schema_version from migrate() if database is too new --- odb/schema-catalog.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'odb') 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) -- cgit v1.1