summaryrefslogtreecommitdiff
path: root/odb-tests/common/changelog/add-foreign-key-mysql-patch.xml
diff options
context:
space:
mode:
Diffstat (limited to 'odb-tests/common/changelog/add-foreign-key-mysql-patch.xml')
-rw-r--r--odb-tests/common/changelog/add-foreign-key-mysql-patch.xml25
1 files changed, 25 insertions, 0 deletions
diff --git a/odb-tests/common/changelog/add-foreign-key-mysql-patch.xml b/odb-tests/common/changelog/add-foreign-key-mysql-patch.xml
new file mode 100644
index 0000000..adc9081
--- /dev/null
+++ b/odb-tests/common/changelog/add-foreign-key-mysql-patch.xml
@@ -0,0 +1,25 @@
+<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="mysql" version="1">
+ <changeset version="3"/>
+
+ <model version="2">
+ <table name="object" options="ENGINE=InnoDB" kind="object">
+ <column name="id" type="INT" null="false"/>
+ <column name="o1" type="INT" null="true"/>
+ <primary-key auto="true">
+ <column name="id"/>
+ </primary-key>
+ <foreign-key name="object_o1_fk" deferrable="DEFERRED">
+ <column name="o1"/>
+ <references table="object1">
+ <column name="id"/>
+ </references>
+ </foreign-key>
+ </table>
+ <table name="object1" options="ENGINE=InnoDB" kind="object">
+ <column name="id" type="INT" null="false"/>
+ <primary-key>
+ <column name="id"/>
+ </primary-key>
+ </table>
+ </model>
+</changelog>