From 678b640ba2e4e876a923735c81f2609c1e22151a Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Tue, 9 Dec 2008 17:36:55 +0000 Subject: [PATCH] [ 2408898 ] Implement Cost Collector Type http://sourceforge.net/tracker/index.php?func=detail&aid=2408898&group_id=176962&atid=879335 * drop PP_Cost_Collector.MovementType column * create new PP_Cost_Collector.CostCollectorType column Victor, please review --- .../350_RF2408898_CostCollectorType.sql | 38 +++++++++++++++++++ .../350_RF2408898_CostCollectorType.sql | 36 ++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/migration/352a-trunk/350_RF2408898_CostCollectorType.sql b/migration/352a-trunk/350_RF2408898_CostCollectorType.sql index cc4afd4590..b309f15856 100644 --- a/migration/352a-trunk/350_RF2408898_CostCollectorType.sql +++ b/migration/352a-trunk/350_RF2408898_CostCollectorType.sql @@ -219,3 +219,41 @@ DELETE FROM AD_Ref_List WHERE AD_Ref_List_ID=53238 UPDATE AD_Ref_Table SET WhereClause='C_DocType.AD_Client_ID=@#AD_Client_ID@ AND C_DocType.DocBaseType IN (''MOP'',''MOF'',''MQO'') ',Updated=TO_DATE('2008-12-08 22:08:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53233 ; + + + + + + + + + +ALTER TABLE PP_Cost_Collector ADD CostCollectorType NVARCHAR2(3); +update PP_Cost_Collector set CostCollectorType='100' where MovementType in ('P+','W+'); +update PP_Cost_Collector set CostCollectorType='110' where CostCollectorType is null; +alter table PP_Cost_Collector drop column MovementType; + +-- 09.12.2008 19:25:45 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +ALTER TABLE PP_Cost_Collector ADD CostCollectorType NVARCHAR2(2) +; + +-- 09.12.2008 19:27:54 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET FieldLength=3,Updated=TO_DATE('2008-12-09 19:27:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53827 +; +-- 09.12.2008 19:32:27 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2008-12-09 19:32:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53827 +; + +-- 09.12.2008 19:32:30 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +ALTER TABLE PP_Cost_Collector MODIFY CostCollectorType NVARCHAR2(3) DEFAULT NULL +; + +-- 09.12.2008 19:32:30 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +ALTER TABLE PP_Cost_Collector MODIFY CostCollectorType NOT NULL +; + diff --git a/migration/352a-trunk/postgresql/350_RF2408898_CostCollectorType.sql b/migration/352a-trunk/postgresql/350_RF2408898_CostCollectorType.sql index 27c5d9dae2..ac7f82f904 100644 --- a/migration/352a-trunk/postgresql/350_RF2408898_CostCollectorType.sql +++ b/migration/352a-trunk/postgresql/350_RF2408898_CostCollectorType.sql @@ -218,3 +218,39 @@ DELETE FROM AD_Ref_List WHERE AD_Ref_List_ID=53238 UPDATE AD_Ref_Table SET WhereClause='C_DocType.AD_Client_ID=@#AD_Client_ID@ AND C_DocType.DocBaseType IN (''MOP'',''MOF'',''MQO'') ',Updated=TO_TIMESTAMP('2008-12-08 22:08:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53233 ; + + + + + + + +ALTER TABLE PP_Cost_Collector ADD COLUMN CostCollectorType VARCHAR(3); +update PP_Cost_Collector set CostCollectorType='100' where MovementType in ('P+','W+'); +update PP_Cost_Collector set CostCollectorType='110' where CostCollectorType is null; +alter table PP_Cost_Collector drop column MovementType; + +-- 09.12.2008 19:25:45 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +ALTER TABLE PP_Cost_Collector ADD COLUMN CostCollectorType VARCHAR(2) +; + +-- 09.12.2008 19:27:54 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET FieldLength=3,Updated=TO_TIMESTAMP('2008-12-09 19:27:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53827 +; +-- 09.12.2008 19:32:27 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2008-12-09 19:32:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53827 +; + +-- 09.12.2008 19:32:30 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +insert into t_alter_column values('pp_cost_collector','CostCollectorType','VARCHAR(3)',null,'NULL') +; + +-- 09.12.2008 19:32:30 EET +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +insert into t_alter_column values('pp_cost_collector','CostCollectorType',null,'NOT NULL',null) +; +