From d7485ea4c98d80403a32d59522875c4b2bb04afe Mon Sep 17 00:00:00 2001 From: Layda Salas Date: Tue, 15 Mar 2022 09:32:31 +0100 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-2494=20Attribute=20Value=20allowing?= =?UTF-8?q?=20duplicated=20values=20#resolve=C2=A0#fixversion=C2=A010=20(#?= =?UTF-8?q?1241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oracle/202203101742_IDEMPIERE-2494.sql | 26 +++++++++++++++++++ .../202203101742_IDEMPIERE-2494.sql | 23 ++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 migration/iD10/oracle/202203101742_IDEMPIERE-2494.sql create mode 100644 migration/iD10/postgresql/202203101742_IDEMPIERE-2494.sql diff --git a/migration/iD10/oracle/202203101742_IDEMPIERE-2494.sql b/migration/iD10/oracle/202203101742_IDEMPIERE-2494.sql new file mode 100644 index 0000000000..5a6e915d79 --- /dev/null +++ b/migration/iD10/oracle/202203101742_IDEMPIERE-2494.sql @@ -0,0 +1,26 @@ +-- IDEMPIERE-2494 Attribute Value allowing duplicated values +SELECT register_migration_script('202203101742_IDEMPIERE-2494.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Mar 10, 2022, 5:45:09 PM CET +INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201102,'7fbbb629-7d69-4dff-94e0-69581f3fba2b',TO_TIMESTAMP('2022-03-10 17:45:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','m_attributevalue_value_attribute_idx',TO_TIMESTAMP('2022-03-10 17:45:08','YYYY-MM-DD HH24:MI:SS'),100,558,'N','Y','N','N','N') +; + +-- Mar 10, 2022, 5:45:27 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201453,'1759824b-4acc-4c08-a100-359e43aaa401',TO_TIMESTAMP('2022-03-10 17:45:27','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:45:27','YYYY-MM-DD HH24:MI:SS'),100,8464,201102,10) +; + +-- Mar 10, 2022, 5:45:49 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201454,'0ee8184c-e7a6-4923-8141-713b206ac265',TO_TIMESTAMP('2022-03-10 17:45:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:45:48','YYYY-MM-DD HH24:MI:SS'),100,8466,201102,20) +; + +-- Mar 10, 2022, 5:46:00 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201455,'37c8351f-4d05-4a2d-9e3e-064523e7651b',TO_TIMESTAMP('2022-03-10 17:46:00','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:46:00','YYYY-MM-DD HH24:MI:SS'),100,8459,201102,30) +; + +-- Mar 10, 2022, 5:48:18 PM CET +CREATE UNIQUE INDEX m_attributevalue_value_attribute_idx ON M_AttributeValue (AD_Client_ID,M_Attribute_ID,Value) +; + diff --git a/migration/iD10/postgresql/202203101742_IDEMPIERE-2494.sql b/migration/iD10/postgresql/202203101742_IDEMPIERE-2494.sql new file mode 100644 index 0000000000..9d0241d6d4 --- /dev/null +++ b/migration/iD10/postgresql/202203101742_IDEMPIERE-2494.sql @@ -0,0 +1,23 @@ +-- IDEMPIERE-2494 Attribute Value allowing duplicated values +SELECT register_migration_script('202203101742_IDEMPIERE-2494.sql') FROM dual; + +-- Mar 10, 2022, 5:45:09 PM CET +INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201102,'7fbbb629-7d69-4dff-94e0-69581f3fba2b',TO_TIMESTAMP('2022-03-10 17:45:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','m_attributevalue_value_attribute_idx',TO_TIMESTAMP('2022-03-10 17:45:08','YYYY-MM-DD HH24:MI:SS'),100,558,'N','Y','N','N','N') +; + +-- Mar 10, 2022, 5:45:27 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201453,'1759824b-4acc-4c08-a100-359e43aaa401',TO_TIMESTAMP('2022-03-10 17:45:27','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:45:27','YYYY-MM-DD HH24:MI:SS'),100,8464,201102,10) +; + +-- Mar 10, 2022, 5:45:49 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201454,'0ee8184c-e7a6-4923-8141-713b206ac265',TO_TIMESTAMP('2022-03-10 17:45:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:45:48','YYYY-MM-DD HH24:MI:SS'),100,8466,201102,20) +; + +-- Mar 10, 2022, 5:46:00 PM CET +INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201455,'37c8351f-4d05-4a2d-9e3e-064523e7651b',TO_TIMESTAMP('2022-03-10 17:46:00','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2022-03-10 17:46:00','YYYY-MM-DD HH24:MI:SS'),100,8459,201102,30) +; + +-- Mar 10, 2022, 5:48:18 PM CET +CREATE UNIQUE INDEX m_attributevalue_value_attribute_idx ON M_AttributeValue (AD_Client_ID,M_Attribute_ID,Value) +; +