create core schema as a first migration
This commit is contained in:
parent
a544ccd1a7
commit
c8edd241d5
|
@ -103,12 +103,24 @@ bool Migration::do_migration(int & current_table_version)
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
|
||||||
ok = ok && morm::Model::do_migration(current_table_version, 1, this, &Migration::do_migration_to_1);
|
ok = ok && morm::Model::do_migration(current_table_version, 1, this, &Migration::do_migration_to_1);
|
||||||
|
ok = ok && morm::Model::do_migration(current_table_version, 2, this, &Migration::do_migration_to_2);
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Migration::do_migration_to_1()
|
bool Migration::do_migration_to_1()
|
||||||
|
{
|
||||||
|
const char * str = R"sql(
|
||||||
|
create schema core
|
||||||
|
);
|
||||||
|
)sql";
|
||||||
|
|
||||||
|
return db_query(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Migration::do_migration_to_2()
|
||||||
{
|
{
|
||||||
// IMPROVEME
|
// IMPROVEME
|
||||||
// what about 'create schema core'?
|
// what about 'create schema core'?
|
||||||
|
|
|
@ -84,6 +84,7 @@ private:
|
||||||
|
|
||||||
|
|
||||||
bool do_migration_to_1();
|
bool do_migration_to_1();
|
||||||
|
bool do_migration_to_2();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue