From 9ecf8955737cfd1b1feb3421240389b439ba3759 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 Apr 2013 07:26:39 +0200 Subject: Add schema_catalog::drop_schema(), control schema dropping in create_schema() --- odb/schema-catalog.hxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'odb/schema-catalog.hxx') 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 -- cgit v1.1