From a8dfcfcff2534695ae19015fd33cb26fd2fb88c6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 26 Mar 2013 13:03:13 +0200 Subject: Add changelog support for add, drop, and later column --- common/changelog/add-column-mssql-diff.xml | 16 ++++++++++++++++ common/changelog/add-column-mssql-patch.xml | 11 +++++++++++ common/changelog/add-column-mysql-diff.xml | 16 ++++++++++++++++ common/changelog/add-column-mysql-patch.xml | 11 +++++++++++ common/changelog/add-column-oracle-diff.xml | 16 ++++++++++++++++ common/changelog/add-column-oracle-patch.xml | 11 +++++++++++ common/changelog/add-column-pgsql-diff.xml | 16 ++++++++++++++++ common/changelog/add-column-pgsql-patch.xml | 11 +++++++++++ common/changelog/add-column-sqlite-diff.xml | 16 ++++++++++++++++ common/changelog/add-column-sqlite-patch.xml | 11 +++++++++++ common/changelog/add-column.hxx | 21 +++++++++++++++++++++ common/changelog/alter-column-mssql-diff.xml | 17 +++++++++++++++++ common/changelog/alter-column-mssql-patch.xml | 11 +++++++++++ common/changelog/alter-column-mysql-diff.xml | 17 +++++++++++++++++ common/changelog/alter-column-mysql-patch.xml | 11 +++++++++++ common/changelog/alter-column-oracle-diff.xml | 17 +++++++++++++++++ common/changelog/alter-column-oracle-patch.xml | 11 +++++++++++ common/changelog/alter-column-pgsql-diff.xml | 17 +++++++++++++++++ common/changelog/alter-column-pgsql-patch.xml | 11 +++++++++++ common/changelog/alter-column-sqlite-diff.xml | 17 +++++++++++++++++ common/changelog/alter-column-sqlite-patch.xml | 11 +++++++++++ common/changelog/alter-column.hxx | 22 ++++++++++++++++++++++ common/changelog/drop-column-mssql-diff.xml | 17 +++++++++++++++++ common/changelog/drop-column-mssql-patch.xml | 10 ++++++++++ common/changelog/drop-column-mysql-diff.xml | 17 +++++++++++++++++ common/changelog/drop-column-mysql-patch.xml | 10 ++++++++++ common/changelog/drop-column-oracle-diff.xml | 17 +++++++++++++++++ common/changelog/drop-column-oracle-patch.xml | 10 ++++++++++ common/changelog/drop-column-pgsql-diff.xml | 17 +++++++++++++++++ common/changelog/drop-column-pgsql-patch.xml | 10 ++++++++++ common/changelog/drop-column-sqlite-diff.xml | 17 +++++++++++++++++ common/changelog/drop-column-sqlite-patch.xml | 10 ++++++++++ common/changelog/drop-column.hxx | 21 +++++++++++++++++++++ common/changelog/makefile | 8 +++++++- 34 files changed, 481 insertions(+), 1 deletion(-) create mode 100644 common/changelog/add-column-mssql-diff.xml create mode 100644 common/changelog/add-column-mssql-patch.xml create mode 100644 common/changelog/add-column-mysql-diff.xml create mode 100644 common/changelog/add-column-mysql-patch.xml create mode 100644 common/changelog/add-column-oracle-diff.xml create mode 100644 common/changelog/add-column-oracle-patch.xml create mode 100644 common/changelog/add-column-pgsql-diff.xml create mode 100644 common/changelog/add-column-pgsql-patch.xml create mode 100644 common/changelog/add-column-sqlite-diff.xml create mode 100644 common/changelog/add-column-sqlite-patch.xml create mode 100644 common/changelog/add-column.hxx create mode 100644 common/changelog/alter-column-mssql-diff.xml create mode 100644 common/changelog/alter-column-mssql-patch.xml create mode 100644 common/changelog/alter-column-mysql-diff.xml create mode 100644 common/changelog/alter-column-mysql-patch.xml create mode 100644 common/changelog/alter-column-oracle-diff.xml create mode 100644 common/changelog/alter-column-oracle-patch.xml create mode 100644 common/changelog/alter-column-pgsql-diff.xml create mode 100644 common/changelog/alter-column-pgsql-patch.xml create mode 100644 common/changelog/alter-column-sqlite-diff.xml create mode 100644 common/changelog/alter-column-sqlite-patch.xml create mode 100644 common/changelog/alter-column.hxx create mode 100644 common/changelog/drop-column-mssql-diff.xml create mode 100644 common/changelog/drop-column-mssql-patch.xml create mode 100644 common/changelog/drop-column-mysql-diff.xml create mode 100644 common/changelog/drop-column-mysql-patch.xml create mode 100644 common/changelog/drop-column-oracle-diff.xml create mode 100644 common/changelog/drop-column-oracle-patch.xml create mode 100644 common/changelog/drop-column-pgsql-diff.xml create mode 100644 common/changelog/drop-column-pgsql-patch.xml create mode 100644 common/changelog/drop-column-sqlite-diff.xml create mode 100644 common/changelog/drop-column-sqlite-patch.xml create mode 100644 common/changelog/drop-column.hxx diff --git a/common/changelog/add-column-mssql-diff.xml b/common/changelog/add-column-mssql-diff.xml new file mode 100644 index 0000000..7485d9c --- /dev/null +++ b/common/changelog/add-column-mssql-diff.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-mssql-patch.xml b/common/changelog/add-column-mssql-patch.xml new file mode 100644 index 0000000..44de8f2 --- /dev/null +++ b/common/changelog/add-column-mssql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-mysql-diff.xml b/common/changelog/add-column-mysql-diff.xml new file mode 100644 index 0000000..7485d9c --- /dev/null +++ b/common/changelog/add-column-mysql-diff.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-mysql-patch.xml b/common/changelog/add-column-mysql-patch.xml new file mode 100644 index 0000000..44de8f2 --- /dev/null +++ b/common/changelog/add-column-mysql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-oracle-diff.xml b/common/changelog/add-column-oracle-diff.xml new file mode 100644 index 0000000..cbd2451 --- /dev/null +++ b/common/changelog/add-column-oracle-diff.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-oracle-patch.xml b/common/changelog/add-column-oracle-patch.xml new file mode 100644 index 0000000..a517a59 --- /dev/null +++ b/common/changelog/add-column-oracle-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-pgsql-diff.xml b/common/changelog/add-column-pgsql-diff.xml new file mode 100644 index 0000000..f19e9e9 --- /dev/null +++ b/common/changelog/add-column-pgsql-diff.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-pgsql-patch.xml b/common/changelog/add-column-pgsql-patch.xml new file mode 100644 index 0000000..10958e6 --- /dev/null +++ b/common/changelog/add-column-pgsql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-sqlite-diff.xml b/common/changelog/add-column-sqlite-diff.xml new file mode 100644 index 0000000..f19e9e9 --- /dev/null +++ b/common/changelog/add-column-sqlite-diff.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-column-sqlite-patch.xml b/common/changelog/add-column-sqlite-patch.xml new file mode 100644 index 0000000..10958e6 --- /dev/null +++ b/common/changelog/add-column-sqlite-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/add-column.hxx b/common/changelog/add-column.hxx new file mode 100644 index 0000000..b185ad9 --- /dev/null +++ b/common/changelog/add-column.hxx @@ -0,0 +1,21 @@ +// file : common/changelog/add-column.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ADD_COLUMN_HXX +#define ADD_COLUMN_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER > 1 + int num; +#endif +}; + +#endif // ADD_COLUMN_HXX diff --git a/common/changelog/alter-column-mssql-diff.xml b/common/changelog/alter-column-mssql-diff.xml new file mode 100644 index 0000000..907fb8d --- /dev/null +++ b/common/changelog/alter-column-mssql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-mssql-patch.xml b/common/changelog/alter-column-mssql-patch.xml new file mode 100644 index 0000000..a1d25da --- /dev/null +++ b/common/changelog/alter-column-mssql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-mysql-diff.xml b/common/changelog/alter-column-mysql-diff.xml new file mode 100644 index 0000000..907fb8d --- /dev/null +++ b/common/changelog/alter-column-mysql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-mysql-patch.xml b/common/changelog/alter-column-mysql-patch.xml new file mode 100644 index 0000000..a1d25da --- /dev/null +++ b/common/changelog/alter-column-mysql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-oracle-diff.xml b/common/changelog/alter-column-oracle-diff.xml new file mode 100644 index 0000000..4a2b0df --- /dev/null +++ b/common/changelog/alter-column-oracle-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-oracle-patch.xml b/common/changelog/alter-column-oracle-patch.xml new file mode 100644 index 0000000..2245880 --- /dev/null +++ b/common/changelog/alter-column-oracle-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-pgsql-diff.xml b/common/changelog/alter-column-pgsql-diff.xml new file mode 100644 index 0000000..0027190 --- /dev/null +++ b/common/changelog/alter-column-pgsql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-pgsql-patch.xml b/common/changelog/alter-column-pgsql-patch.xml new file mode 100644 index 0000000..dd954ad --- /dev/null +++ b/common/changelog/alter-column-pgsql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-sqlite-diff.xml b/common/changelog/alter-column-sqlite-diff.xml new file mode 100644 index 0000000..0027190 --- /dev/null +++ b/common/changelog/alter-column-sqlite-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column-sqlite-patch.xml b/common/changelog/alter-column-sqlite-patch.xml new file mode 100644 index 0000000..dd954ad --- /dev/null +++ b/common/changelog/alter-column-sqlite-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/alter-column.hxx b/common/changelog/alter-column.hxx new file mode 100644 index 0000000..769553b --- /dev/null +++ b/common/changelog/alter-column.hxx @@ -0,0 +1,22 @@ +// file : common/changelog/alter-column.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ALTER_COLUMN_HXX +#define ALTER_COLUMN_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER > 1 + #pragma db null +#endif + int num; +}; + +#endif // ALTER_COLUMN_HXX diff --git a/common/changelog/drop-column-mssql-diff.xml b/common/changelog/drop-column-mssql-diff.xml new file mode 100644 index 0000000..496f8c7 --- /dev/null +++ b/common/changelog/drop-column-mssql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-mssql-patch.xml b/common/changelog/drop-column-mssql-patch.xml new file mode 100644 index 0000000..1a38c38 --- /dev/null +++ b/common/changelog/drop-column-mssql-patch.xml @@ -0,0 +1,10 @@ + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-mysql-diff.xml b/common/changelog/drop-column-mysql-diff.xml new file mode 100644 index 0000000..496f8c7 --- /dev/null +++ b/common/changelog/drop-column-mysql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-mysql-patch.xml b/common/changelog/drop-column-mysql-patch.xml new file mode 100644 index 0000000..1a38c38 --- /dev/null +++ b/common/changelog/drop-column-mysql-patch.xml @@ -0,0 +1,10 @@ + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-oracle-diff.xml b/common/changelog/drop-column-oracle-diff.xml new file mode 100644 index 0000000..00b8394 --- /dev/null +++ b/common/changelog/drop-column-oracle-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-oracle-patch.xml b/common/changelog/drop-column-oracle-patch.xml new file mode 100644 index 0000000..a53c3aa --- /dev/null +++ b/common/changelog/drop-column-oracle-patch.xml @@ -0,0 +1,10 @@ + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-pgsql-diff.xml b/common/changelog/drop-column-pgsql-diff.xml new file mode 100644 index 0000000..ae2e6b9 --- /dev/null +++ b/common/changelog/drop-column-pgsql-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-pgsql-patch.xml b/common/changelog/drop-column-pgsql-patch.xml new file mode 100644 index 0000000..8f19f4b --- /dev/null +++ b/common/changelog/drop-column-pgsql-patch.xml @@ -0,0 +1,10 @@ + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-sqlite-diff.xml b/common/changelog/drop-column-sqlite-diff.xml new file mode 100644 index 0000000..ae2e6b9 --- /dev/null +++ b/common/changelog/drop-column-sqlite-diff.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-column-sqlite-patch.xml b/common/changelog/drop-column-sqlite-patch.xml new file mode 100644 index 0000000..8f19f4b --- /dev/null +++ b/common/changelog/drop-column-sqlite-patch.xml @@ -0,0 +1,10 @@ + + + + + + + +
+
+
diff --git a/common/changelog/drop-column.hxx b/common/changelog/drop-column.hxx new file mode 100644 index 0000000..70fbcba --- /dev/null +++ b/common/changelog/drop-column.hxx @@ -0,0 +1,21 @@ +// file : common/changelog/drop-column.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef DROP_COLUMN_HXX +#define DROP_COLUMN_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER == 1 + int num; +#endif +}; + +#endif // DROP_COLUMN_HXX diff --git a/common/changelog/makefile b/common/changelog/makefile index 0819616..1349509 100644 --- a/common/changelog/makefile +++ b/common/changelog/makefile @@ -4,7 +4,13 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make -odb_hdr := model.hxx add-table.hxx drop-table.hxx +odb_hdr := \ +model.hxx \ +add-table.hxx \ +drop-table.hxx \ +add-column.hxx \ +drop-column.hxx \ +alter-column.hxx common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options -- cgit v1.1