diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-28 11:21:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-28 11:21:46 +0200 |
commit | b6f2b4e1e924965d55e656992a48cc3cd19e64a2 (patch) | |
tree | 79889e297996eaf92a57da8380c54f1fcfc7fa7d /libcommon/common/common.cxx | |
parent | 6dd8138b765b8533958bc23d39e95a17377d4f75 (diff) |
Add schema creation flag to create_database()
Diffstat (limited to 'libcommon/common/common.cxx')
-rw-r--r-- | libcommon/common/common.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libcommon/common/common.cxx b/libcommon/common/common.cxx index 1ed65e3..a6fa4e1 100644 --- a/libcommon/common/common.cxx +++ b/libcommon/common/common.cxx @@ -34,7 +34,14 @@ namespace sqlite = odb::sqlite; #endif auto_ptr<database> -create_database (int& argc, char* argv[], size_t max_connections) +create_database (int& argc, + char* argv[], +#if defined(DATABASE_SQLITE) + bool schema, +#else + bool, +#endif + size_t max_connections) { if (argc > 1 && argv[1] == string ("--help")) { @@ -71,6 +78,7 @@ create_database (int& argc, char* argv[], size_t max_connections) // Create the database schema. // + if (schema) { transaction t (db->begin ()); schema_catalog::create_schema (*db); |