From b0391e168b489811708ca7ba5f71a0eb67b46ffe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 3 Apr 2013 11:22:42 +0200 Subject: Generate add/drop table migration statements --- odb/options.cli | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'odb/options.cli') diff --git a/odb/options.cli b/odb/options.cli index b086011..457c06f 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -112,7 +112,14 @@ class options the generated C++ code. By default the SQL file is generated for the MySQL, PostgreSQL, Oracle, and Microsoft SQL Server databases and the schema is embedded into the C++ code for the SQLite database. - Use the \cb{--schema-format} option to alter the default schema format." + Use the \cb{--schema-format} option to alter the default schema format. + + If database schema evolution support is enabled (that is, the object + model version is specified), then this option also triggers the + generation of database schema migration statements, again either as + standalong SQL files or embedded into the generated C++ code. You can + suppress the generation of schema migration statements by specifying + the \cb{--suppress-migration} option." }; bool --generate-schema-only @@ -122,6 +129,11 @@ class options for details)." }; + bool --suppress-migration + { + "Suppress the generation of database schema migration statements." + }; + database_map > --schema-format { "", @@ -323,6 +335,13 @@ class options options unless they are absolute paths." }; + bool --init-changelog + { + "Force re-initialization of the changelog even if one exists (all the + existing change history will be lost). This option is primarily useful + for automated testing." + }; + database_map --odb-file-suffix { "", @@ -428,6 +447,12 @@ class options "Insert at the beginning of the generated database schema file." }; + database_map > --migration-prologue + { + "", + "Insert at the beginning of the generated database migration file." + }; + // Interludes. // database_map > --sql-interlude @@ -469,6 +494,12 @@ class options "Insert at the end of the generated database schema file." }; + database_map > --migration-epilogue + { + "", + "Insert at the end of the generated database migration file." + }; + // Prologue files. // database_map --hxx-prologue-file @@ -506,6 +537,13 @@ class options database schema file." }; + database_map --migration-prologue-file + { + "", + "Insert the content of file at the beginning of the generated database + migration file." + }; + // Interlude files. // database_map --sql-interlude-file @@ -552,6 +590,13 @@ class options schema file." }; + database_map --migration-epilogue-file + { + "", + "Insert the content of file at the end of the generated database + migration file." + }; + // ODB compilation prologue/epilogue. // database_map > --odb-prologue -- cgit v1.1