diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-25 07:26:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-25 07:26:39 +0200 |
commit | 9ecf8955737cfd1b1feb3421240389b439ba3759 (patch) | |
tree | 2746779e695a61d43c8f285c898c862dba9483b4 /odb/schema-catalog.hxx | |
parent | 287a41287ed26bcf481f087680cad56ed5ef9865 (diff) |
Add schema_catalog::drop_schema(), control schema dropping in create_schema()
Diffstat (limited to 'odb/schema-catalog.hxx')
-rw-r--r-- | odb/schema-catalog.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/odb/schema-catalog.hxx b/odb/schema-catalog.hxx index da6b767..a186de4 100644 --- a/odb/schema-catalog.hxx +++ b/odb/schema-catalog.hxx @@ -21,7 +21,10 @@ namespace odb // Schema creation. // static void - create_schema (database&, const std::string& name = ""); + create_schema (database&, const std::string& name = "", bool drop = true); + + static void + drop_schema (database&, const std::string& name = ""); // Schema migration. // @@ -76,13 +79,13 @@ namespace odb // Test for presence of a schema with a specific name. // static bool - exists (const database& db, const std::string& name) + exists (const database& db, const std::string& name = "") { return exists (db.id (), name); } static bool - exists (database_id, const std::string& name); + exists (database_id, const std::string& name = ""); private: enum migrate_mode |