From def8f0adafa9d1f2e86a6d76851ae9cc60fb0f6c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 6 Nov 2017 16:26:34 +0100 Subject: [PATCH] IDEMPIERE-3547 Mismatches in oracle foreign keys delete rule --- .../oracle/201711061621_IDEMPIERE-3547.sql | 31 +++++++++++++++++++ .../201711061621_IDEMPIERE-3547.sql | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 migration/i5.1/oracle/201711061621_IDEMPIERE-3547.sql create mode 100644 migration/i5.1/postgresql/201711061621_IDEMPIERE-3547.sql diff --git a/migration/i5.1/oracle/201711061621_IDEMPIERE-3547.sql b/migration/i5.1/oracle/201711061621_IDEMPIERE-3547.sql new file mode 100644 index 0000000000..d948116502 --- /dev/null +++ b/migration/i5.1/oracle/201711061621_IDEMPIERE-3547.sql @@ -0,0 +1,31 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3547 Mismatches in oracle foreign keys delete rule +-- Nov 6, 2017 4:21:15 PM CET +ALTER TABLE C_OrderLine DROP CONSTRAINT linkorderline_corderline +; + +-- Nov 6, 2017 4:21:15 PM CET +ALTER TABLE C_OrderLine ADD CONSTRAINT linkorderline_corderline FOREIGN KEY (Link_OrderLine_ID) REFERENCES c_orderline(c_orderline_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 6, 2017 4:21:26 PM CET +ALTER TABLE A_Asset_Acct DROP CONSTRAINT aasset_aassetacct +; + +-- Nov 6, 2017 4:21:26 PM CET +ALTER TABLE A_Asset_Acct ADD CONSTRAINT aasset_aassetacct FOREIGN KEY (A_Asset_ID) REFERENCES a_asset(a_asset_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED +; + +-- Nov 6, 2017 4:21:36 PM CET +ALTER TABLE A_Asset_Group_Acct DROP CONSTRAINT aassetgroup_aassetgroupacct +; + +-- Nov 6, 2017 4:21:36 PM CET +ALTER TABLE A_Asset_Group_Acct ADD CONSTRAINT aassetgroup_aassetgroupacct FOREIGN KEY (A_Asset_Group_ID) REFERENCES a_asset_group(a_asset_group_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED +; + +SELECT register_migration_script('201711061621_IDEMPIERE-3547.sql') FROM dual +; + diff --git a/migration/i5.1/postgresql/201711061621_IDEMPIERE-3547.sql b/migration/i5.1/postgresql/201711061621_IDEMPIERE-3547.sql new file mode 100644 index 0000000000..6220daed2f --- /dev/null +++ b/migration/i5.1/postgresql/201711061621_IDEMPIERE-3547.sql @@ -0,0 +1,6 @@ +-- IDEMPIERE-3547 Mismatches in oracle foreign keys delete rule +-- Not necessary in postgresql, just for oracle + +SELECT register_migration_script('201711061621_IDEMPIERE-3547.sql') FROM dual +; +