From ccd8bfac2f8635bc73d4144267802fd52eeb59a9 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 15 Aug 2011 13:13:32 -0500 Subject: [PATCH] Integrate foreign keys for Adaxa POS IDEMPIERE-61 --- .../oracle/803_FK_POS_BF2975308_FR2979756.sql | 14 ++++++++++++++ .../postgresql/803_FK_POS_BF2975308_FR2979756.sql | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 migration/360lts-release/oracle/803_FK_POS_BF2975308_FR2979756.sql create mode 100644 migration/360lts-release/postgresql/803_FK_POS_BF2975308_FR2979756.sql diff --git a/migration/360lts-release/oracle/803_FK_POS_BF2975308_FR2979756.sql b/migration/360lts-release/oracle/803_FK_POS_BF2975308_FR2979756.sql new file mode 100644 index 0000000000..a348351f3e --- /dev/null +++ b/migration/360lts-release/oracle/803_FK_POS_BF2975308_FR2979756.sql @@ -0,0 +1,14 @@ +ALTER TABLE C_POSKey ADD CONSTRAINT ADImage_CPOSKey FOREIGN KEY(AD_Image_ID) REFERENCES AD_Image(AD_Image_ID); + +ALTER TABLE C_POS ADD (CONSTRAINT OSKKeyLayout_CPOS FOREIGN KEY (OSK_KeyLayout_ID) REFERENCES C_POSKeyLayout); + +ALTER TABLE C_POS ADD (CONSTRAINT OSNPKeyLayout_CPOS FOREIGN KEY (OSNP_KeyLayout_ID) REFERENCES C_POSKeyLayout); + +ALTER TABLE C_POSKey ADD (CONSTRAINT ADPrintFont_CPOSKey FOREIGN KEY (AD_PrintFont_ID) REFERENCES AD_PrintFont); + +ALTER TABLE C_POSKey ADD (CONSTRAINT SubKeyLayout_CPOSKey FOREIGN KEY (SubKeyLayout_ID) REFERENCES C_POSKeyLayout); + +ALTER TABLE C_POSKeyLayout ADD (CONSTRAINT ADPrintColor_CPOSKeyLayout FOREIGN KEY (AD_PrintColor_ID) REFERENCES AD_PrintColor); + +ALTER TABLE C_POSKeyLayout ADD (CONSTRAINT ADPrintFont_CPOSKeyLayout FOREIGN KEY (AD_PrintFont_ID) REFERENCES AD_PrintFont); + diff --git a/migration/360lts-release/postgresql/803_FK_POS_BF2975308_FR2979756.sql b/migration/360lts-release/postgresql/803_FK_POS_BF2975308_FR2979756.sql new file mode 100644 index 0000000000..116c5c21a7 --- /dev/null +++ b/migration/360lts-release/postgresql/803_FK_POS_BF2975308_FR2979756.sql @@ -0,0 +1,13 @@ +ALTER TABLE C_POSKey ADD CONSTRAINT ADImage_CPOSKey FOREIGN KEY(AD_Image_ID) REFERENCES AD_Image(AD_Image_ID) DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POS ADD CONSTRAINT OSKKeyLayout_CPOS FOREIGN KEY (OSK_KeyLayout_ID) REFERENCES C_POSKeyLayout DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POS ADD CONSTRAINT OSNPKeyLayout_CPOS FOREIGN KEY (OSNP_KeyLayout_ID) REFERENCES C_POSKeyLayout DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POSKey ADD CONSTRAINT ADPrintFont_CPOSKey FOREIGN KEY (AD_PrintFont_ID) REFERENCES AD_PrintFont DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POSKey ADD CONSTRAINT SubKeyLayout_CPOSKey FOREIGN KEY (SubKeyLayout_ID) REFERENCES C_POSKeyLayout DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POSKeyLayout ADD CONSTRAINT ADPrintColor_CPOSKeyLayout FOREIGN KEY (AD_PrintColor_ID) REFERENCES AD_PrintColor DEFERRABLE INITIALLY DEFERRED; + +ALTER TABLE C_POSKeyLayout ADD CONSTRAINT ADPrintFont_CPOSKeyLayout FOREIGN KEY (AD_PrintFont_ID) REFERENCES AD_PrintFont DEFERRABLE INITIALLY DEFERRED;