Several foreign keys in _TRL tables have been changed to 'ondelete cascade'. Upgrader should now work correctly with non-numeric primary keys.
authorAntonio Moreno <antonio.moreno@openbravo.com>
Wed, 30 Jul 2008 15:36:20 +0000
changeset 1519 d04b4c2dcbdb
parent 1518 89db304c4ce2
child 1520 a370f314c831
Several foreign keys in _TRL tables have been changed to 'ondelete cascade'. Upgrader should now work correctly with non-numeric primary keys.
src-db/database/lib/dbsourcemanager.jar
src-db/database/model/tables/AD_ALERTRULE_TRL.xml
src-db/database/model/tables/AD_FIELDGROUP_TRL.xml
src-db/database/model/tables/AD_FORM_TRL.xml
src-db/database/model/tables/AD_TEXTINTERFACES_TRL.xml
src-db/database/model/tables/AT_COMMAND_TRL.xml
src-db/database/model/tables/C_COUNTRY_TRL.xml
src-db/database/model/tables/C_CURRENCY_TRL.xml
src-db/database/model/tables/C_GREETING_TRL.xml
src-db/database/model/tables/C_TAXCATEGORY_TRL.xml
src-db/database/model/tables/C_TAX_TRL.xml
Binary file src-db/database/lib/dbsourcemanager.jar has changed
--- a/src-db/database/model/tables/AD_ALERTRULE_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/AD_ALERTRULE_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -45,7 +45,7 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRULETRL">
+      <foreign-key foreignTable="AD_ALERTRULE" name="ADALERTRULE_ADALERTRULETRL" onDelete="cascade">
         <reference local="AD_ALERTRULE_ID" foreign="AD_ALERTRULE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADALERRTRULETRL">
--- a/src-db/database/model/tables/AD_FIELDGROUP_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/AD_FIELDGROUP_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -48,7 +48,7 @@
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFIELDGROUPTRL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FIELDGROUP" name="ADFIELDGROUP_TRL">
+      <foreign-key foreignTable="AD_FIELDGROUP" name="ADFIELDGROUP_TRL" onDelete="cascade">
         <reference local="AD_FIELDGROUP_ID" foreign="AD_FIELDGROUP_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADFIELDGROUPTRL">
--- a/src-db/database/model/tables/AD_FORM_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/AD_FORM_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -56,7 +56,7 @@
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADFORMTRL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADFORMTRL">
+      <foreign-key foreignTable="AD_FORM" name="ADFORM_ADFORMTRL" onDelete="cascade">
         <reference local="AD_FORM_ID" foreign="AD_FORM_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_LANGUAGE" name="ADLANGUAGE_ADFORMTRL">
--- a/src-db/database/model/tables/AD_TEXTINTERFACES_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/AD_TEXTINTERFACES_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -48,7 +48,7 @@
       <foreign-key foreignTable="AD_LANGUAGE" name="AD_LANGUAGE_TEXTINTERFACESTRL">
         <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TEXTINTERFACES" name="AD_TEXTINTERFACESTRL">
+      <foreign-key foreignTable="AD_TEXTINTERFACES" name="AD_TEXTINTERFACESTRL" onDelete="cascade">
         <reference local="AD_TEXTINTERFACES_ID" foreign="AD_TEXTINTERFACES_ID"/>
       </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTEXTINTERFACESTRL">
--- a/src-db/database/model/tables/AT_COMMAND_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/AT_COMMAND_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -70,7 +70,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_ATCOMMANDTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AT_COMMAND" name="AT_COMMANDTRL">
+      <foreign-key foreignTable="AT_COMMAND" name="AT_COMMANDTRL" onDelete="cascade">
         <reference local="AT_COMMAND_ID" foreign="AT_COMMAND_ID"/>
       </foreign-key>
       <check name="ATCOMMANDTRL_IS_ANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_COUNTRY_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/C_COUNTRY_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -66,7 +66,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_CCOUNTRYTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CCOUNTRYTRL">
+      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_CCOUNTRYTRL" onDelete="cascade">
         <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
       </foreign-key>
       <check name="C_COUNTRY_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_CURRENCY_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/C_CURRENCY_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -58,7 +58,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_CCURRENCYTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCURRENCYTRL">
+      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CCURRENCYTRL" onDelete="cascade">
         <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
       </foreign-key>
       <check name="C_CURRENCY_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_GREETING_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/C_GREETING_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -58,7 +58,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_CGREETINGTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_GREETING" name="CGREETING_CGREETINGTRL">
+      <foreign-key foreignTable="C_GREETING" name="CGREETING_CGREETINGTRL" onDelete="cascade">
         <reference local="C_GREETING_ID" foreign="C_GREETING_ID"/>
       </foreign-key>
       <index name="C_GREETING_TRL_UN_KEY" unique="true">
--- a/src-db/database/model/tables/C_TAXCATEGORY_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/C_TAXCATEGORY_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -58,7 +58,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_CTAXCATEGORYTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAXCATEGORY" name="CTAXCATEGORY_TRL">
+      <foreign-key foreignTable="C_TAXCATEGORY" name="CTAXCATEGORY_TRL" onDelete="cascade">
         <reference local="C_TAXCATEGORY_ID" foreign="C_TAXCATEGORY_ID"/>
       </foreign-key>
       <check name="CTAXCATEG_ISTRANSLATED_CHECK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/C_TAX_TRL.xml	Wed Jul 30 14:11:11 2008 +0000
+++ b/src-db/database/model/tables/C_TAX_TRL.xml	Wed Jul 30 15:36:20 2008 +0000
@@ -62,7 +62,7 @@
       <foreign-key foreignTable="AD_ORG" name="ADORG_CTAXTRL">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_TAX" name="CTAX_CTAXTRL">
+      <foreign-key foreignTable="C_TAX" name="CTAX_CTAXTRL" onDelete="cascade">
         <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
       </foreign-key>
       <check name="C_TAX_TRL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>