From b52fbbd3f2f6873e9c3dcd2cfde4aa14c15b7a09 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 14 Dec 2023 23:26:19 +0100 Subject: [PATCH] IDEMPIERE-5697 Improve Process Log for more advanced logging options for Processes (#2141) - revert making AD_PInstance_Log.AD_PInstance_Log_UU primary key, left just as unique constraint IDEMPIERE-5957 --- .../oracle/202305020844_IDEMPIERE-5697.sql | 2 +- .../oracle/202305020845_IDEMPIERE-5697.sql | 34 +++++++++++++++++++ .../202305020844_IDEMPIERE-5697.sql | 2 +- .../202305020845_IDEMPIERE-5697.sql | 31 +++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 migration/iD11/oracle/202305020845_IDEMPIERE-5697.sql create mode 100644 migration/iD11/postgresql/202305020845_IDEMPIERE-5697.sql diff --git a/migration/iD11/oracle/202305020844_IDEMPIERE-5697.sql b/migration/iD11/oracle/202305020844_IDEMPIERE-5697.sql index 16fd2b9f1d..90f86b0ded 100644 --- a/migration/iD11/oracle/202305020844_IDEMPIERE-5697.sql +++ b/migration/iD11/oracle/202305020844_IDEMPIERE-5697.sql @@ -66,7 +66,7 @@ ALTER TABLE AD_PInstance_Log DROP PRIMARY KEY ; -- May 15, 2023, 10:50:19 AM CEST -ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu PRIMARY KEY (AD_PInstance_Log_UU) +ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu UNIQUE (AD_PInstance_Log_UU) ; -- May 15, 2023, 3:03:52 PM CEST diff --git a/migration/iD11/oracle/202305020845_IDEMPIERE-5697.sql b/migration/iD11/oracle/202305020845_IDEMPIERE-5697.sql new file mode 100644 index 0000000000..1cc0ea795d --- /dev/null +++ b/migration/iD11/oracle/202305020845_IDEMPIERE-5697.sql @@ -0,0 +1,34 @@ +-- IDEMPIERE-5697 Improve Process Log for more advanced logging options for Processes +SELECT register_migration_script('202305020845_IDEMPIERE-5697.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Dec 14, 2023, 3:28:54 PM CET +UPDATE AD_TableIndex SET Name='ad_pinstance_log_uu_idx',Updated=TO_TIMESTAMP('2023-12-14 15:28:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_TableIndex_ID=200138 +; + +-- Dec 14, 2023, 1:55:11 PM CET +UPDATE AD_Column SET IsParent='Y', IsUpdateable='N',Updated=TO_TIMESTAMP('2023-12-14 13:55:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8779 +; + +-- Dec 14, 2023, 1:55:41 PM CET +UPDATE AD_TableIndex SET IsKey='N',Updated=TO_TIMESTAMP('2023-12-14 13:55:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_TableIndex_ID=200138 +; + +-- Dec 14, 2023, 1:55:45 PM CET +ALTER TABLE AD_PInstance_Log DROP CONSTRAINT ad_pinstance_log_uu CASCADE +; + +-- Dec 14, 2023, 1:55:49 PM CET +ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu_idx UNIQUE (AD_PInstance_Log_UU) +; + +-- Dec 14, 2023, 1:56:20 PM CET +ALTER TABLE AD_PInstance_Log MODIFY AD_PInstance_Log_UU VARCHAR2(36 CHAR) DEFAULT NULL +; + +-- Dec 14, 2023, 1:56:20 PM CET +-- ALTER TABLE AD_PInstance_Log MODIFY AD_PInstance_Log_UU NULL +-- ; + diff --git a/migration/iD11/postgresql/202305020844_IDEMPIERE-5697.sql b/migration/iD11/postgresql/202305020844_IDEMPIERE-5697.sql index 2666996b36..2876a01a9c 100644 --- a/migration/iD11/postgresql/202305020844_IDEMPIERE-5697.sql +++ b/migration/iD11/postgresql/202305020844_IDEMPIERE-5697.sql @@ -63,7 +63,7 @@ ALTER TABLE AD_PInstance_Log DROP CONSTRAINT ad_pinstance_log_pkey CASCADE ; -- May 15, 2023, 10:50:19 AM CEST -ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu PRIMARY KEY (AD_PInstance_Log_UU) +ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu UNIQUE (AD_PInstance_Log_UU) ; -- May 15, 2023, 3:03:52 PM CEST diff --git a/migration/iD11/postgresql/202305020845_IDEMPIERE-5697.sql b/migration/iD11/postgresql/202305020845_IDEMPIERE-5697.sql new file mode 100644 index 0000000000..380d7ae1ca --- /dev/null +++ b/migration/iD11/postgresql/202305020845_IDEMPIERE-5697.sql @@ -0,0 +1,31 @@ +-- IDEMPIERE-5697 Improve Process Log for more advanced logging options for Processes +SELECT register_migration_script('202305020845_IDEMPIERE-5697.sql') FROM dual; + +-- Dec 14, 2023, 3:28:54 PM CET +UPDATE AD_TableIndex SET Name='ad_pinstance_log_uu_idx',Updated=TO_TIMESTAMP('2023-12-14 15:28:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_TableIndex_ID=200138 +; + +-- Dec 14, 2023, 1:55:11 PM CET +UPDATE AD_Column SET IsParent='Y', IsUpdateable='N',Updated=TO_TIMESTAMP('2023-12-14 13:55:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8779 +; + +-- Dec 14, 2023, 1:55:41 PM CET +UPDATE AD_TableIndex SET IsKey='N',Updated=TO_TIMESTAMP('2023-12-14 13:55:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_TableIndex_ID=200138 +; + +-- Dec 14, 2023, 1:55:45 PM CET +ALTER TABLE AD_PInstance_Log DROP CONSTRAINT ad_pinstance_log_uu CASCADE +; + +-- Dec 14, 2023, 1:55:49 PM CET +ALTER TABLE AD_PInstance_Log ADD CONSTRAINT ad_pinstance_log_uu_idx UNIQUE (AD_PInstance_Log_UU) +; + +-- Dec 14, 2023, 1:56:20 PM CET +INSERT INTO t_alter_column values('ad_pinstance_log','AD_PInstance_Log_UU','VARCHAR(36)',null,'NULL') +; + +-- Dec 14, 2023, 1:56:20 PM CET +INSERT INTO t_alter_column values('ad_pinstance_log','AD_PInstance_Log_UU',null,'NULL',null) +; +