From e7f6315882ef16939f99dd757eaf800b9f12e92b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 28 Mar 2013 16:04:48 +0200 Subject: Add changelog support for add/drop index/foreign key Also diagnose changes to primary keys and establish the 'alters' association. --- common/changelog/add-foreign-key-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-mssql-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-mssql-patch.xml | 23 +++++++++++++++++ common/changelog/add-foreign-key-mysql-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-mysql-patch.xml | 23 +++++++++++++++++ common/changelog/add-foreign-key-oracle-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-oracle-patch.xml | 23 +++++++++++++++++ common/changelog/add-foreign-key-pgsql-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-pgsql-patch.xml | 23 +++++++++++++++++ common/changelog/add-foreign-key-sqlite-diff.xml | 28 ++++++++++++++++++++ common/changelog/add-foreign-key-sqlite-patch.xml | 23 +++++++++++++++++ common/changelog/add-foreign-key.hxx | 30 ++++++++++++++++++++++ common/changelog/add-index-mssql-diff.xml | 21 +++++++++++++++ common/changelog/add-index-mssql-patch.xml | 16 ++++++++++++ common/changelog/add-index-mysql-diff.xml | 21 +++++++++++++++ common/changelog/add-index-mysql-patch.xml | 16 ++++++++++++ common/changelog/add-index-oracle-diff.xml | 21 +++++++++++++++ common/changelog/add-index-oracle-patch.xml | 16 ++++++++++++ common/changelog/add-index-pgsql-diff.xml | 21 +++++++++++++++ common/changelog/add-index-pgsql-patch.xml | 16 ++++++++++++ common/changelog/add-index-sqlite-diff.xml | 21 +++++++++++++++ common/changelog/add-index-sqlite-patch.xml | 16 ++++++++++++ common/changelog/add-index.hxx | 25 ++++++++++++++++++ common/changelog/drop-foreign-key-mssql-diff.xml | 30 ++++++++++++++++++++++ common/changelog/drop-foreign-key-mssql-patch.xml | 16 ++++++++++++ common/changelog/drop-foreign-key-mysql-diff.xml | 30 ++++++++++++++++++++++ common/changelog/drop-foreign-key-mysql-patch.xml | 16 ++++++++++++ common/changelog/drop-foreign-key-oracle-diff.xml | 30 ++++++++++++++++++++++ common/changelog/drop-foreign-key-oracle-patch.xml | 16 ++++++++++++ common/changelog/drop-foreign-key-pgsql-diff.xml | 30 ++++++++++++++++++++++ common/changelog/drop-foreign-key-pgsql-patch.xml | 16 ++++++++++++ common/changelog/drop-foreign-key-sqlite-diff.xml | 30 ++++++++++++++++++++++ common/changelog/drop-foreign-key-sqlite-patch.xml | 16 ++++++++++++ common/changelog/drop-foreign-key.hxx | 30 ++++++++++++++++++++++ common/changelog/drop-index-mssql-diff.xml | 20 +++++++++++++++ common/changelog/drop-index-mssql-patch.xml | 11 ++++++++ common/changelog/drop-index-mysql-diff.xml | 20 +++++++++++++++ common/changelog/drop-index-mysql-patch.xml | 11 ++++++++ common/changelog/drop-index-oracle-diff.xml | 20 +++++++++++++++ common/changelog/drop-index-oracle-patch.xml | 11 ++++++++ common/changelog/drop-index-pgsql-diff.xml | 20 +++++++++++++++ common/changelog/drop-index-pgsql-patch.xml | 11 ++++++++ common/changelog/drop-index-sqlite-diff.xml | 20 +++++++++++++++ common/changelog/drop-index-sqlite-patch.xml | 11 ++++++++ common/changelog/drop-index.hxx | 22 ++++++++++++++++ common/changelog/makefile | 18 ++++++++----- 46 files changed, 971 insertions(+), 7 deletions(-) create mode 100644 common/changelog/add-foreign-key-diff.xml create mode 100644 common/changelog/add-foreign-key-mssql-diff.xml create mode 100644 common/changelog/add-foreign-key-mssql-patch.xml create mode 100644 common/changelog/add-foreign-key-mysql-diff.xml create mode 100644 common/changelog/add-foreign-key-mysql-patch.xml create mode 100644 common/changelog/add-foreign-key-oracle-diff.xml create mode 100644 common/changelog/add-foreign-key-oracle-patch.xml create mode 100644 common/changelog/add-foreign-key-pgsql-diff.xml create mode 100644 common/changelog/add-foreign-key-pgsql-patch.xml create mode 100644 common/changelog/add-foreign-key-sqlite-diff.xml create mode 100644 common/changelog/add-foreign-key-sqlite-patch.xml create mode 100644 common/changelog/add-foreign-key.hxx create mode 100644 common/changelog/add-index-mssql-diff.xml create mode 100644 common/changelog/add-index-mssql-patch.xml create mode 100644 common/changelog/add-index-mysql-diff.xml create mode 100644 common/changelog/add-index-mysql-patch.xml create mode 100644 common/changelog/add-index-oracle-diff.xml create mode 100644 common/changelog/add-index-oracle-patch.xml create mode 100644 common/changelog/add-index-pgsql-diff.xml create mode 100644 common/changelog/add-index-pgsql-patch.xml create mode 100644 common/changelog/add-index-sqlite-diff.xml create mode 100644 common/changelog/add-index-sqlite-patch.xml create mode 100644 common/changelog/add-index.hxx create mode 100644 common/changelog/drop-foreign-key-mssql-diff.xml create mode 100644 common/changelog/drop-foreign-key-mssql-patch.xml create mode 100644 common/changelog/drop-foreign-key-mysql-diff.xml create mode 100644 common/changelog/drop-foreign-key-mysql-patch.xml create mode 100644 common/changelog/drop-foreign-key-oracle-diff.xml create mode 100644 common/changelog/drop-foreign-key-oracle-patch.xml create mode 100644 common/changelog/drop-foreign-key-pgsql-diff.xml create mode 100644 common/changelog/drop-foreign-key-pgsql-patch.xml create mode 100644 common/changelog/drop-foreign-key-sqlite-diff.xml create mode 100644 common/changelog/drop-foreign-key-sqlite-patch.xml create mode 100644 common/changelog/drop-foreign-key.hxx create mode 100644 common/changelog/drop-index-mssql-diff.xml create mode 100644 common/changelog/drop-index-mssql-patch.xml create mode 100644 common/changelog/drop-index-mysql-diff.xml create mode 100644 common/changelog/drop-index-mysql-patch.xml create mode 100644 common/changelog/drop-index-oracle-diff.xml create mode 100644 common/changelog/drop-index-oracle-patch.xml create mode 100644 common/changelog/drop-index-pgsql-diff.xml create mode 100644 common/changelog/drop-index-pgsql-patch.xml create mode 100644 common/changelog/drop-index-sqlite-diff.xml create mode 100644 common/changelog/drop-index-sqlite-patch.xml create mode 100644 common/changelog/drop-index.hxx (limited to 'common/changelog') diff --git a/common/changelog/add-foreign-key-diff.xml b/common/changelog/add-foreign-key-diff.xml new file mode 100644 index 0000000..34c0952 --- /dev/null +++ b/common/changelog/add-foreign-key-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-mssql-diff.xml b/common/changelog/add-foreign-key-mssql-diff.xml new file mode 100644 index 0000000..594f253 --- /dev/null +++ b/common/changelog/add-foreign-key-mssql-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-mssql-patch.xml b/common/changelog/add-foreign-key-mssql-patch.xml new file mode 100644 index 0000000..17e5d14 --- /dev/null +++ b/common/changelog/add-foreign-key-mssql-patch.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-mysql-diff.xml b/common/changelog/add-foreign-key-mysql-diff.xml new file mode 100644 index 0000000..594f253 --- /dev/null +++ b/common/changelog/add-foreign-key-mysql-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-mysql-patch.xml b/common/changelog/add-foreign-key-mysql-patch.xml new file mode 100644 index 0000000..17e5d14 --- /dev/null +++ b/common/changelog/add-foreign-key-mysql-patch.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-oracle-diff.xml b/common/changelog/add-foreign-key-oracle-diff.xml new file mode 100644 index 0000000..14f2357 --- /dev/null +++ b/common/changelog/add-foreign-key-oracle-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-oracle-patch.xml b/common/changelog/add-foreign-key-oracle-patch.xml new file mode 100644 index 0000000..6168736 --- /dev/null +++ b/common/changelog/add-foreign-key-oracle-patch.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-pgsql-diff.xml b/common/changelog/add-foreign-key-pgsql-diff.xml new file mode 100644 index 0000000..34c0952 --- /dev/null +++ b/common/changelog/add-foreign-key-pgsql-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-pgsql-patch.xml b/common/changelog/add-foreign-key-pgsql-patch.xml new file mode 100644 index 0000000..e70ad87 --- /dev/null +++ b/common/changelog/add-foreign-key-pgsql-patch.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-sqlite-diff.xml b/common/changelog/add-foreign-key-sqlite-diff.xml new file mode 100644 index 0000000..34c0952 --- /dev/null +++ b/common/changelog/add-foreign-key-sqlite-diff.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key-sqlite-patch.xml b/common/changelog/add-foreign-key-sqlite-patch.xml new file mode 100644 index 0000000..e70ad87 --- /dev/null +++ b/common/changelog/add-foreign-key-sqlite-patch.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/add-foreign-key.hxx b/common/changelog/add-foreign-key.hxx new file mode 100644 index 0000000..d6cec68 --- /dev/null +++ b/common/changelog/add-foreign-key.hxx @@ -0,0 +1,30 @@ +// file : common/changelog/add-foreign-key.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ADD_FOREIGN_KEY_HXX +#define ADD_FOREIGN_KEY_HXX + +#pragma db model version(BVER, CVER, true) + +struct object1; + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER > 1 + object1* o1; +#endif +}; + +#pragma db object +struct object1 +{ + #pragma db id + int id; +}; + +#endif // ADD_FOREIGN_KEY_HXX diff --git a/common/changelog/add-index-mssql-diff.xml b/common/changelog/add-index-mssql-diff.xml new file mode 100644 index 0000000..33634f8 --- /dev/null +++ b/common/changelog/add-index-mssql-diff.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-mssql-patch.xml b/common/changelog/add-index-mssql-patch.xml new file mode 100644 index 0000000..cac5886 --- /dev/null +++ b/common/changelog/add-index-mssql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-mysql-diff.xml b/common/changelog/add-index-mysql-diff.xml new file mode 100644 index 0000000..33634f8 --- /dev/null +++ b/common/changelog/add-index-mysql-diff.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-mysql-patch.xml b/common/changelog/add-index-mysql-patch.xml new file mode 100644 index 0000000..cac5886 --- /dev/null +++ b/common/changelog/add-index-mysql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-oracle-diff.xml b/common/changelog/add-index-oracle-diff.xml new file mode 100644 index 0000000..d32bada --- /dev/null +++ b/common/changelog/add-index-oracle-diff.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-oracle-patch.xml b/common/changelog/add-index-oracle-patch.xml new file mode 100644 index 0000000..91353a9 --- /dev/null +++ b/common/changelog/add-index-oracle-patch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-pgsql-diff.xml b/common/changelog/add-index-pgsql-diff.xml new file mode 100644 index 0000000..969abd8 --- /dev/null +++ b/common/changelog/add-index-pgsql-diff.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-pgsql-patch.xml b/common/changelog/add-index-pgsql-patch.xml new file mode 100644 index 0000000..559dd4d --- /dev/null +++ b/common/changelog/add-index-pgsql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-sqlite-diff.xml b/common/changelog/add-index-sqlite-diff.xml new file mode 100644 index 0000000..969abd8 --- /dev/null +++ b/common/changelog/add-index-sqlite-diff.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index-sqlite-patch.xml b/common/changelog/add-index-sqlite-patch.xml new file mode 100644 index 0000000..559dd4d --- /dev/null +++ b/common/changelog/add-index-sqlite-patch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/add-index.hxx b/common/changelog/add-index.hxx new file mode 100644 index 0000000..92437ab --- /dev/null +++ b/common/changelog/add-index.hxx @@ -0,0 +1,25 @@ +// file : common/changelog/add-index.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ADD_INDEX_HXX +#define ADD_INDEX_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + + int x; + +#if CVER > 1 + int y; + #pragma db index ("xy_i") unique member(x) member(y, "DESC") +#endif + +}; + +#endif // ADD_INDEX_HXX diff --git a/common/changelog/drop-foreign-key-mssql-diff.xml b/common/changelog/drop-foreign-key-mssql-diff.xml new file mode 100644 index 0000000..30dba42 --- /dev/null +++ b/common/changelog/drop-foreign-key-mssql-diff.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-mssql-patch.xml b/common/changelog/drop-foreign-key-mssql-patch.xml new file mode 100644 index 0000000..b6d6e63 --- /dev/null +++ b/common/changelog/drop-foreign-key-mssql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-mysql-diff.xml b/common/changelog/drop-foreign-key-mysql-diff.xml new file mode 100644 index 0000000..30dba42 --- /dev/null +++ b/common/changelog/drop-foreign-key-mysql-diff.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-mysql-patch.xml b/common/changelog/drop-foreign-key-mysql-patch.xml new file mode 100644 index 0000000..b6d6e63 --- /dev/null +++ b/common/changelog/drop-foreign-key-mysql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-oracle-diff.xml b/common/changelog/drop-foreign-key-oracle-diff.xml new file mode 100644 index 0000000..8a36172 --- /dev/null +++ b/common/changelog/drop-foreign-key-oracle-diff.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-oracle-patch.xml b/common/changelog/drop-foreign-key-oracle-patch.xml new file mode 100644 index 0000000..f544817 --- /dev/null +++ b/common/changelog/drop-foreign-key-oracle-patch.xml @@ -0,0 +1,16 @@ + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-pgsql-diff.xml b/common/changelog/drop-foreign-key-pgsql-diff.xml new file mode 100644 index 0000000..8f7c6f1 --- /dev/null +++ b/common/changelog/drop-foreign-key-pgsql-diff.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-pgsql-patch.xml b/common/changelog/drop-foreign-key-pgsql-patch.xml new file mode 100644 index 0000000..a666b86 --- /dev/null +++ b/common/changelog/drop-foreign-key-pgsql-patch.xml @@ -0,0 +1,16 @@ + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-sqlite-diff.xml b/common/changelog/drop-foreign-key-sqlite-diff.xml new file mode 100644 index 0000000..8f7c6f1 --- /dev/null +++ b/common/changelog/drop-foreign-key-sqlite-diff.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key-sqlite-patch.xml b/common/changelog/drop-foreign-key-sqlite-patch.xml new file mode 100644 index 0000000..a666b86 --- /dev/null +++ b/common/changelog/drop-foreign-key-sqlite-patch.xml @@ -0,0 +1,16 @@ + + + + + + + +
+ + + + + +
+
+
diff --git a/common/changelog/drop-foreign-key.hxx b/common/changelog/drop-foreign-key.hxx new file mode 100644 index 0000000..4a70c6b --- /dev/null +++ b/common/changelog/drop-foreign-key.hxx @@ -0,0 +1,30 @@ +// file : common/changelog/drop-foreign-key.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef DROP_FOREIGN_KEY_HXX +#define DROP_FOREIGN_KEY_HXX + +#pragma db model version(BVER, CVER, true) + +struct object1; + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER == 1 + object1* o1; +#endif +}; + +#pragma db object +struct object1 +{ + #pragma db id + int id; +}; + +#endif // DROP_FOREIGN_KEY_HXX diff --git a/common/changelog/drop-index-mssql-diff.xml b/common/changelog/drop-index-mssql-diff.xml new file mode 100644 index 0000000..4bf9fb8 --- /dev/null +++ b/common/changelog/drop-index-mssql-diff.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-mssql-patch.xml b/common/changelog/drop-index-mssql-patch.xml new file mode 100644 index 0000000..44de8f2 --- /dev/null +++ b/common/changelog/drop-index-mssql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-mysql-diff.xml b/common/changelog/drop-index-mysql-diff.xml new file mode 100644 index 0000000..4bf9fb8 --- /dev/null +++ b/common/changelog/drop-index-mysql-diff.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-mysql-patch.xml b/common/changelog/drop-index-mysql-patch.xml new file mode 100644 index 0000000..44de8f2 --- /dev/null +++ b/common/changelog/drop-index-mysql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-oracle-diff.xml b/common/changelog/drop-index-oracle-diff.xml new file mode 100644 index 0000000..9c717e6 --- /dev/null +++ b/common/changelog/drop-index-oracle-diff.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-oracle-patch.xml b/common/changelog/drop-index-oracle-patch.xml new file mode 100644 index 0000000..a517a59 --- /dev/null +++ b/common/changelog/drop-index-oracle-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-pgsql-diff.xml b/common/changelog/drop-index-pgsql-diff.xml new file mode 100644 index 0000000..e3c0d1d --- /dev/null +++ b/common/changelog/drop-index-pgsql-diff.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-pgsql-patch.xml b/common/changelog/drop-index-pgsql-patch.xml new file mode 100644 index 0000000..10958e6 --- /dev/null +++ b/common/changelog/drop-index-pgsql-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-sqlite-diff.xml b/common/changelog/drop-index-sqlite-diff.xml new file mode 100644 index 0000000..e3c0d1d --- /dev/null +++ b/common/changelog/drop-index-sqlite-diff.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index-sqlite-patch.xml b/common/changelog/drop-index-sqlite-patch.xml new file mode 100644 index 0000000..10958e6 --- /dev/null +++ b/common/changelog/drop-index-sqlite-patch.xml @@ -0,0 +1,11 @@ + + + + + + + + +
+
+
diff --git a/common/changelog/drop-index.hxx b/common/changelog/drop-index.hxx new file mode 100644 index 0000000..f1f1846 --- /dev/null +++ b/common/changelog/drop-index.hxx @@ -0,0 +1,22 @@ +// file : common/changelog/drop-index.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef DROP_INDEX_HXX +#define DROP_INDEX_HXX + +#pragma db model version(BVER, CVER, true) + +#pragma db object +struct object +{ + #pragma db id auto + int id; + +#if CVER == 1 + #pragma db index +#endif + int num; +}; + +#endif // DROP_INDEX_HXX diff --git a/common/changelog/makefile b/common/changelog/makefile index 1349509..0e4ecf9 100644 --- a/common/changelog/makefile +++ b/common/changelog/makefile @@ -4,13 +4,17 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make -odb_hdr := \ -model.hxx \ -add-table.hxx \ -drop-table.hxx \ -add-column.hxx \ -drop-column.hxx \ -alter-column.hxx +odb_hdr := \ +model.hxx \ +add-table.hxx \ +drop-table.hxx \ +add-column.hxx \ +drop-column.hxx \ +alter-column.hxx \ +add-index.hxx \ +drop-index.hxx \ +add-foreign-key.hxx \ +drop-foreign-key.hxx common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options -- cgit v1.1