From 287a41287ed26bcf481f087680cad56ed5ef9865 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Apr 2013 16:17:26 +0200 Subject: Add support for embedded schema migration --- odb/schema-catalog-impl.hxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'odb/schema-catalog-impl.hxx') diff --git a/odb/schema-catalog-impl.hxx b/odb/schema-catalog-impl.hxx index 414dadd..f14f1df 100644 --- a/odb/schema-catalog-impl.hxx +++ b/odb/schema-catalog-impl.hxx @@ -9,7 +9,7 @@ #include -#include +#include // schema_version #include @@ -32,13 +32,22 @@ namespace odb // Catalog entry registration. // - struct LIBODB_EXPORT schema_catalog_entry + struct LIBODB_EXPORT schema_catalog_create_entry { - schema_catalog_entry ( - database_id id, + schema_catalog_create_entry ( + database_id, const char* name, bool (*create_function) (database&, unsigned short pass, bool drop)); }; + + struct LIBODB_EXPORT schema_catalog_migrate_entry + { + schema_catalog_migrate_entry ( + database_id, + const char* name, + schema_version, + bool (*migrate_function) (database&, unsigned short pass, bool pre)); + }; } #include -- cgit v1.1