diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-08 11:13:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-10 18:46:47 +0200 |
commit | acd66db1ce8aa960b34710857ce990dd048cd3ae (patch) | |
tree | 05a355b8b2c0a9c40a54ab20d529188ee36ec34a /common | |
parent | 0429c7b008594a874696f91c29b17ae4ee40efff (diff) |
Generate add/drop foreign key migration statements
Also add the --fkeys-deferrable-mode option. General schemas generation
rework.
Diffstat (limited to 'common')
36 files changed, 36 insertions, 36 deletions
diff --git a/common/changelog/add-foreign-key-diff.xml b/common/changelog/add-foreign-key-diff.xml index 34c0952..06079b8 100644 --- a/common/changelog/add-foreign-key-diff.xml +++ b/common/changelog/add-foreign-key-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="INTEGER" null="true"/> - <add-foreign-key name="o1_fk" deferred="true"> + <add-foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-mssql-diff.xml b/common/changelog/add-foreign-key-mssql-diff.xml index 594f253..cc231a2 100644 --- a/common/changelog/add-foreign-key-mssql-diff.xml +++ b/common/changelog/add-foreign-key-mssql-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="INT" null="true"/> - <add-foreign-key name="object_o1_fk" deferred="true"> + <add-foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-mssql-patch.xml b/common/changelog/add-foreign-key-mssql-patch.xml index 17e5d14..e15f436 100644 --- a/common/changelog/add-foreign-key-mssql-patch.xml +++ b/common/changelog/add-foreign-key-mssql-patch.xml @@ -6,7 +6,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-mysql-diff.xml b/common/changelog/add-foreign-key-mysql-diff.xml index 594f253..cc231a2 100644 --- a/common/changelog/add-foreign-key-mysql-diff.xml +++ b/common/changelog/add-foreign-key-mysql-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="INT" null="true"/> - <add-foreign-key name="object_o1_fk" deferred="true"> + <add-foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-mysql-patch.xml b/common/changelog/add-foreign-key-mysql-patch.xml index 17e5d14..e15f436 100644 --- a/common/changelog/add-foreign-key-mysql-patch.xml +++ b/common/changelog/add-foreign-key-mysql-patch.xml @@ -6,7 +6,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-oracle-diff.xml b/common/changelog/add-foreign-key-oracle-diff.xml index 14f2357..3131542 100644 --- a/common/changelog/add-foreign-key-oracle-diff.xml +++ b/common/changelog/add-foreign-key-oracle-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="NUMBER(10)" null="true"/> - <add-foreign-key name="object_o1_fk" deferred="true"> + <add-foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-oracle-patch.xml b/common/changelog/add-foreign-key-oracle-patch.xml index 6168736..7984282 100644 --- a/common/changelog/add-foreign-key-oracle-patch.xml +++ b/common/changelog/add-foreign-key-oracle-patch.xml @@ -6,7 +6,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-pgsql-diff.xml b/common/changelog/add-foreign-key-pgsql-diff.xml index 34c0952..06079b8 100644 --- a/common/changelog/add-foreign-key-pgsql-diff.xml +++ b/common/changelog/add-foreign-key-pgsql-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="INTEGER" null="true"/> - <add-foreign-key name="o1_fk" deferred="true"> + <add-foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-pgsql-patch.xml b/common/changelog/add-foreign-key-pgsql-patch.xml index e70ad87..6422322 100644 --- a/common/changelog/add-foreign-key-pgsql-patch.xml +++ b/common/changelog/add-foreign-key-pgsql-patch.xml @@ -6,7 +6,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-sqlite-diff.xml b/common/changelog/add-foreign-key-sqlite-diff.xml index 34c0952..06079b8 100644 --- a/common/changelog/add-foreign-key-sqlite-diff.xml +++ b/common/changelog/add-foreign-key-sqlite-diff.xml @@ -2,7 +2,7 @@ <changeset version="2"> <alter-table name="object"> <add-column name="o1" type="INTEGER" null="true"/> - <add-foreign-key name="o1_fk" deferred="true"> + <add-foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-foreign-key-sqlite-patch.xml b/common/changelog/add-foreign-key-sqlite-patch.xml index e70ad87..6422322 100644 --- a/common/changelog/add-foreign-key-sqlite-patch.xml +++ b/common/changelog/add-foreign-key-sqlite-patch.xml @@ -6,7 +6,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-mssql-diff.xml b/common/changelog/add-table-mssql-diff.xml index 8d3a95d..4e9c97f 100644 --- a/common/changelog/add-table-mssql-diff.xml +++ b/common/changelog/add-table-mssql-diff.xml @@ -7,7 +7,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-mssql-patch.xml b/common/changelog/add-table-mssql-patch.xml index 204a5a9..0edc34d 100644 --- a/common/changelog/add-table-mssql-patch.xml +++ b/common/changelog/add-table-mssql-patch.xml @@ -14,7 +14,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-mysql-diff.xml b/common/changelog/add-table-mysql-diff.xml index 019e51c..f158c9c 100644 --- a/common/changelog/add-table-mysql-diff.xml +++ b/common/changelog/add-table-mysql-diff.xml @@ -7,7 +7,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-mysql-patch.xml b/common/changelog/add-table-mysql-patch.xml index 127139a..1781451 100644 --- a/common/changelog/add-table-mysql-patch.xml +++ b/common/changelog/add-table-mysql-patch.xml @@ -14,7 +14,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-oracle-diff.xml b/common/changelog/add-table-oracle-diff.xml index e04ba2b..642d06e 100644 --- a/common/changelog/add-table-oracle-diff.xml +++ b/common/changelog/add-table-oracle-diff.xml @@ -7,7 +7,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-oracle-patch.xml b/common/changelog/add-table-oracle-patch.xml index b0e32c0..461f3eb 100644 --- a/common/changelog/add-table-oracle-patch.xml +++ b/common/changelog/add-table-oracle-patch.xml @@ -14,7 +14,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-pgsql-diff.xml b/common/changelog/add-table-pgsql-diff.xml index 61c4985..6bec713 100644 --- a/common/changelog/add-table-pgsql-diff.xml +++ b/common/changelog/add-table-pgsql-diff.xml @@ -7,7 +7,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-pgsql-patch.xml b/common/changelog/add-table-pgsql-patch.xml index 33f8850..f20d442 100644 --- a/common/changelog/add-table-pgsql-patch.xml +++ b/common/changelog/add-table-pgsql-patch.xml @@ -14,7 +14,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-sqlite-diff.xml b/common/changelog/add-table-sqlite-diff.xml index 97b7e24..3971906 100644 --- a/common/changelog/add-table-sqlite-diff.xml +++ b/common/changelog/add-table-sqlite-diff.xml @@ -7,7 +7,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/add-table-sqlite-patch.xml b/common/changelog/add-table-sqlite-patch.xml index 84c9d75..dd25b79 100644 --- a/common/changelog/add-table-sqlite-patch.xml +++ b/common/changelog/add-table-sqlite-patch.xml @@ -14,7 +14,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-foreign-key-mssql-diff.xml b/common/changelog/drop-foreign-key-mssql-diff.xml index 30dba42..6840f2e 100644 --- a/common/changelog/drop-foreign-key-mssql-diff.xml +++ b/common/changelog/drop-foreign-key-mssql-diff.xml @@ -13,7 +13,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-foreign-key-mysql-diff.xml b/common/changelog/drop-foreign-key-mysql-diff.xml index 30dba42..6840f2e 100644 --- a/common/changelog/drop-foreign-key-mysql-diff.xml +++ b/common/changelog/drop-foreign-key-mysql-diff.xml @@ -13,7 +13,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-foreign-key-oracle-diff.xml b/common/changelog/drop-foreign-key-oracle-diff.xml index 8a36172..b9dc4a8 100644 --- a/common/changelog/drop-foreign-key-oracle-diff.xml +++ b/common/changelog/drop-foreign-key-oracle-diff.xml @@ -13,7 +13,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-foreign-key-pgsql-diff.xml b/common/changelog/drop-foreign-key-pgsql-diff.xml index 8f7c6f1..6821cca 100644 --- a/common/changelog/drop-foreign-key-pgsql-diff.xml +++ b/common/changelog/drop-foreign-key-pgsql-diff.xml @@ -13,7 +13,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-foreign-key-sqlite-diff.xml b/common/changelog/drop-foreign-key-sqlite-diff.xml index 8f7c6f1..6821cca 100644 --- a/common/changelog/drop-foreign-key-sqlite-diff.xml +++ b/common/changelog/drop-foreign-key-sqlite-diff.xml @@ -13,7 +13,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-table-mssql-diff.xml b/common/changelog/drop-table-mssql-diff.xml index 7d6779e..3f46d65 100644 --- a/common/changelog/drop-table-mssql-diff.xml +++ b/common/changelog/drop-table-mssql-diff.xml @@ -12,7 +12,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-table-mysql-diff.xml b/common/changelog/drop-table-mysql-diff.xml index 4b223fb..5cf2490 100644 --- a/common/changelog/drop-table-mysql-diff.xml +++ b/common/changelog/drop-table-mysql-diff.xml @@ -12,7 +12,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-table-oracle-diff.xml b/common/changelog/drop-table-oracle-diff.xml index 9334585..70c06a1 100644 --- a/common/changelog/drop-table-oracle-diff.xml +++ b/common/changelog/drop-table-oracle-diff.xml @@ -12,7 +12,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-table-pgsql-diff.xml b/common/changelog/drop-table-pgsql-diff.xml index 18d01f6..6a4d523 100644 --- a/common/changelog/drop-table-pgsql-diff.xml +++ b/common/changelog/drop-table-pgsql-diff.xml @@ -12,7 +12,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/drop-table-sqlite-diff.xml b/common/changelog/drop-table-sqlite-diff.xml index 5277fd8..61d06d2 100644 --- a/common/changelog/drop-table-sqlite-diff.xml +++ b/common/changelog/drop-table-sqlite-diff.xml @@ -12,7 +12,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1"/> <references table="object1"> <column name="id"/> diff --git a/common/changelog/model-mssql.xml b/common/changelog/model-mssql.xml index d9689a0..95bc102 100644 --- a/common/changelog/model-mssql.xml +++ b/common/changelog/model-mssql.xml @@ -10,7 +10,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1_x"/> <column name="o1_y"/> <references table="object1"> diff --git a/common/changelog/model-mysql.xml b/common/changelog/model-mysql.xml index ed46ebe..a6a811a 100644 --- a/common/changelog/model-mysql.xml +++ b/common/changelog/model-mysql.xml @@ -10,7 +10,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1_x"/> <column name="o1_y"/> <references table="object1"> diff --git a/common/changelog/model-oracle.xml b/common/changelog/model-oracle.xml index 756a355..73fb592 100644 --- a/common/changelog/model-oracle.xml +++ b/common/changelog/model-oracle.xml @@ -10,7 +10,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="object_o1_fk" deferred="true"> + <foreign-key name="object_o1_fk" deferrable="DEFERRED"> <column name="o1_x"/> <column name="o1_y"/> <references table="object1"> diff --git a/common/changelog/model-pgsql.xml b/common/changelog/model-pgsql.xml index 6dad23b..8679129 100644 --- a/common/changelog/model-pgsql.xml +++ b/common/changelog/model-pgsql.xml @@ -10,7 +10,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1_x"/> <column name="o1_y"/> <references table="object1"> diff --git a/common/changelog/model-sqlite.xml b/common/changelog/model-sqlite.xml index 9f22af0..1690d2d 100644 --- a/common/changelog/model-sqlite.xml +++ b/common/changelog/model-sqlite.xml @@ -10,7 +10,7 @@ <primary-key auto="true"> <column name="id"/> </primary-key> - <foreign-key name="o1_fk" deferred="true"> + <foreign-key name="o1_fk" deferrable="DEFERRED"> <column name="o1_x"/> <column name="o1_y"/> <references table="object1"> |