aboutsummaryrefslogtreecommitdiff
path: root/evolution/add-foreign-key/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'evolution/add-foreign-key/driver.cxx')
-rw-r--r--evolution/add-foreign-key/driver.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/evolution/add-foreign-key/driver.cxx b/evolution/add-foreign-key/driver.cxx
index 26c1f57..a05804a 100644
--- a/evolution/add-foreign-key/driver.cxx
+++ b/evolution/add-foreign-key/driver.cxx
@@ -16,10 +16,10 @@
#include <common/config.hxx> // DATABASE_XXX
#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;
@@ -30,7 +30,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
@@ -47,9 +47,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 ();
}
@@ -76,7 +77,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 ();
}
@@ -112,7 +113,7 @@ main (int argc, char* argv[])
if (embedded)
{
transaction t (db->begin ());
- schema_catalog::migrate_schema_post (*db, 3, "test2");
+ schema_catalog::migrate_schema_post (*db, 3);
t.commit ();
}
break;