diff options
Diffstat (limited to 'evolution/drop-table/driver.cxx')
-rw-r--r-- | evolution/drop-table/driver.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/evolution/drop-table/driver.cxx b/evolution/drop-table/driver.cxx index 6ab29f0..1eca664 100644 --- a/evolution/drop-table/driver.cxx +++ b/evolution/drop-table/driver.cxx @@ -15,10 +15,10 @@ #include <common/common.hxx> -#include "test1.hxx" #include "test2.hxx" -#include "test1-odb.hxx" +#include "test3.hxx" #include "test2-odb.hxx" +#include "test3-odb.hxx" using namespace std; using namespace odb::core; @@ -29,7 +29,7 @@ main (int argc, char* argv[]) try { auto_ptr<database> db (create_database (argc, argv, false)); - bool embedded (schema_catalog::exists (*db, "test2")); + bool embedded (schema_catalog::exists (*db)); // 1 - base version // 2 - migration @@ -46,9 +46,10 @@ main (int argc, char* argv[]) if (embedded) { transaction t (db->begin ()); - schema_catalog::create_schema (*db, "test2"); - schema_catalog::create_schema (*db, "test1"); - schema_catalog::migrate_schema (*db, 2, "test2"); + schema_catalog::drop_schema (*db); + schema_catalog::drop_schema (*db, "2"); + schema_catalog::create_schema (*db, "", false); + schema_catalog::migrate_schema (*db, 2); t.commit (); } @@ -74,7 +75,7 @@ main (int argc, char* argv[]) if (embedded) { transaction t (db->begin ()); - schema_catalog::migrate_schema_pre (*db, 3, "test2"); + schema_catalog::migrate_schema_pre (*db, 3); t.commit (); } @@ -100,7 +101,7 @@ main (int argc, char* argv[]) if (embedded) { transaction t (db->begin ()); - schema_catalog::migrate_schema_pre (*db, 3, "test2"); + schema_catalog::migrate_schema_post (*db, 3); t.commit (); } break; |