Preparing release
This commit is contained in:
parent
2fdda52d17
commit
73ab7ffc92
|
@ -43,12 +43,18 @@ UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=5769
|
|||
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=6274
|
||||
;
|
||||
|
||||
UPDATE ad_printformatitem_trl
|
||||
UPDATE ad_printformatitem_trl trl
|
||||
SET NAME = ( SELECT COALESCE(et.name, pf.name)
|
||||
FROM ad_printformatitem pf
|
||||
LEFT JOIN ad_column c ON pf.ad_column_id=c.ad_column_id
|
||||
LEFT JOIN ad_element_trl et ON et.ad_element_id=c.ad_element_id AND et.ad_language=ad_printformatitem_trl.ad_language
|
||||
WHERE pf.ad_printformatitem_id=ad_printformatitem_trl.ad_printformatitem_id);
|
||||
JOIN ad_column C ON pf.ad_column_id=c.ad_column_id
|
||||
JOIN ad_element_trl et ON et.ad_element_id=c.ad_element_id
|
||||
WHERE pf.ad_column_id>0 AND pf.ad_printformatitem_id=trl.ad_printformatitem_id AND et.ad_language=trl.ad_language);
|
||||
|
||||
UPDATE ad_printformatitem_trl trl
|
||||
SET NAME = ( SELECT pf.name
|
||||
FROM ad_printformatitem pf
|
||||
WHERE pf.ad_printformatitem_id=trl.ad_printformatitem_id)
|
||||
WHERE NAME IS NULL;
|
||||
|
||||
-- May 30, 2012 12:15:59 PM COT
|
||||
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-05-30 12:15:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200192
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
-- Jun 6, 2012 10:46:51 PM COT
|
||||
-- Generate new UUID Columns
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_RecentItem_UU',200055,'U','AD_RecentItem_UU','AD_RecentItem_UU','1031b1b5-ada2-458b-a788-6cb8ca0a2178',0,TO_DATE('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:52 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200000,200203,'U','N','N','N','N',36,'N',10,'N',200055,'f0d928f6-6a45-410d-8e14-862540f032e1','N','Y','N','AD_RecentItem_UU','AD_RecentItem_UU',100,TO_DATE('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200203 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
ALTER TABLE AD_RecentItem ADD AD_RecentItem_UU NVARCHAR2(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
CREATE UNIQUE INDEX AD_RecentItem_UU_idx ON ad_recentitem(AD_RecentItem_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:54 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_ToolBarButton_UU',200056,'U','AD_ToolBarButton_UU','AD_ToolBarButton_UU','ca7c14e2-f9d3-4364-bb1a-2b1a928501d7',0,TO_DATE('2012-06-06 22:46:54','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-06-06 22:46:54','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:54 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200056 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200003,200204,'U','N','N','N','N',36,'N',10,'N',200056,'9359048a-5b83-456d-a5a2-13cd7aa86647','N','Y','N','AD_ToolBarButton_UU','AD_ToolBarButton_UU',100,TO_DATE('2012-06-06 22:46:53','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-06-06 22:46:53','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200204 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
ALTER TABLE AD_ToolBarButton ADD AD_ToolBarButton_UU NVARCHAR2(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
CREATE UNIQUE INDEX AD_ToolBarButton_UU_idx ON ad_toolbarbutton(AD_ToolBarButton_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:56 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_ToolBarButtonRestrict_UU',200057,'U','AD_ToolBarButtonRestrict_UU','AD_ToolBarButtonRestrict_UU','e1dc0adf-98d6-44e6-985a-7d5ab96e1bc8',0,TO_DATE('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:56 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200057 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200004,200205,'U','N','N','N','N',36,'N',10,'N',200057,'ad426dc5-b6d1-40dd-a2fe-e22c6f0e8110','N','Y','N','AD_ToolBarButtonRestrict_UU','AD_ToolBarButtonRestrict_UU',100,TO_DATE('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200205 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
ALTER TABLE AD_ToolBarButtonRestrict ADD AD_ToolBarButtonRestrict_UU NVARCHAR2(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
CREATE UNIQUE INDEX AD_ToolBarButtonRestric_UU_idx ON ad_toolbarbuttonrestrict(AD_ToolBarButtonRestrict_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:58 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Fact_Reconciliation_UU',200058,'U','Fact_Reconciliation_UU','Fact_Reconciliation_UU','46ec8163-53f3-4972-9ef4-806e71aa9b3a',0,TO_DATE('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:58 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,53286,200206,'U','N','N','N','N',36,'N',10,'N',200058,'531b7110-79d6-4eef-aaf2-50d1ef31c646','N','Y','N','Fact_Reconciliation_UU','Fact_Reconciliation_UU',100,TO_DATE('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200206 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
ALTER TABLE Fact_Reconciliation ADD Fact_Reconciliation_UU NVARCHAR2(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
CREATE UNIQUE INDEX Fact_Reconciliation_UU_idx ON fact_reconciliation(Fact_Reconciliation_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('T_Reconciliation_UU',200059,'U','T_Reconciliation_UU','T_Reconciliation_UU','466be9cb-65bd-4a1b-a17b-c64f5af64d1a',0,TO_DATE('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,53287,200207,'U','N','N','N','N',36,'N',10,'N',200059,'56c24b4e-98f5-4e2c-9fdf-49a0855ef662','N','Y','N','T_Reconciliation_UU','T_Reconciliation_UU',100,TO_DATE('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200207 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:02 PM COT
|
||||
ALTER TABLE T_Reconciliation ADD T_Reconciliation_UU NVARCHAR2(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:02 PM COT
|
||||
CREATE UNIQUE INDEX T_Reconciliation_UU_idx ON t_reconciliation(T_Reconciliation_UU)
|
||||
;
|
||||
|
||||
UPDATE AD_System
|
||||
SET LastMigrationScriptApplied='846_GenerateNewUUIDColumns.sql'
|
||||
WHERE LastMigrationScriptApplied<'846_GenerateNewUUIDColumns.sql'
|
||||
OR LastMigrationScriptApplied IS NULL
|
||||
;
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,127 @@
|
|||
-- Jun 6, 2012 10:46:51 PM COT
|
||||
-- Generate new UUID Columns
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_RecentItem_UU',200055,'U','AD_RecentItem_UU','AD_RecentItem_UU','1031b1b5-ada2-458b-a788-6cb8ca0a2178',0,TO_TIMESTAMP('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:52 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200000,200203,'U','N','N','N','N',36,'N',10,'N',200055,'f0d928f6-6a45-410d-8e14-862540f032e1','N','Y','N','AD_RecentItem_UU','AD_RecentItem_UU',100,TO_TIMESTAMP('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-06-06 22:46:49','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200203 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
ALTER TABLE AD_RecentItem ADD COLUMN AD_RecentItem_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:53 PM COT
|
||||
CREATE UNIQUE INDEX AD_RecentItem_UU_idx ON ad_recentitem(AD_RecentItem_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:54 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_ToolBarButton_UU',200056,'U','AD_ToolBarButton_UU','AD_ToolBarButton_UU','ca7c14e2-f9d3-4364-bb1a-2b1a928501d7',0,TO_TIMESTAMP('2012-06-06 22:46:54','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-06-06 22:46:54','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:54 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200056 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200003,200204,'U','N','N','N','N',36,'N',10,'N',200056,'9359048a-5b83-456d-a5a2-13cd7aa86647','N','Y','N','AD_ToolBarButton_UU','AD_ToolBarButton_UU',100,TO_TIMESTAMP('2012-06-06 22:46:53','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-06-06 22:46:53','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200204 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
ALTER TABLE AD_ToolBarButton ADD COLUMN AD_ToolBarButton_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:55 PM COT
|
||||
CREATE UNIQUE INDEX AD_ToolBarButton_UU_idx ON ad_toolbarbutton(AD_ToolBarButton_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:56 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_ToolBarButtonRestrict_UU',200057,'U','AD_ToolBarButtonRestrict_UU','AD_ToolBarButtonRestrict_UU','e1dc0adf-98d6-44e6-985a-7d5ab96e1bc8',0,TO_TIMESTAMP('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:56 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200057 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,200004,200205,'U','N','N','N','N',36,'N',10,'N',200057,'ad426dc5-b6d1-40dd-a2fe-e22c6f0e8110','N','Y','N','AD_ToolBarButtonRestrict_UU','AD_ToolBarButtonRestrict_UU',100,TO_TIMESTAMP('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-06-06 22:46:55','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200205 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
ALTER TABLE AD_ToolBarButtonRestrict ADD COLUMN AD_ToolBarButtonRestrict_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:57 PM COT
|
||||
CREATE UNIQUE INDEX AD_ToolBarButtonRestric_UU_idx ON ad_toolbarbuttonrestrict(AD_ToolBarButtonRestrict_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:58 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Fact_Reconciliation_UU',200058,'U','Fact_Reconciliation_UU','Fact_Reconciliation_UU','46ec8163-53f3-4972-9ef4-806e71aa9b3a',0,TO_TIMESTAMP('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:58 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,53286,200206,'U','N','N','N','N',36,'N',10,'N',200058,'531b7110-79d6-4eef-aaf2-50d1ef31c646','N','Y','N','Fact_Reconciliation_UU','Fact_Reconciliation_UU',100,TO_TIMESTAMP('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-06-06 22:46:58','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200206 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
ALTER TABLE Fact_Reconciliation ADD COLUMN Fact_Reconciliation_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:46:59 PM COT
|
||||
CREATE UNIQUE INDEX Fact_Reconciliation_UU_idx ON fact_reconciliation(Fact_Reconciliation_UU)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('T_Reconciliation_UU',200059,'U','T_Reconciliation_UU','T_Reconciliation_UU','466be9cb-65bd-4a1b-a17b-c64f5af64d1a',0,TO_TIMESTAMP('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID) VALUES (1.00,53287,200207,'U','N','N','N','N',36,'N',10,'N',200059,'56c24b4e-98f5-4e2c-9fdf-49a0855ef662','N','Y','N','T_Reconciliation_UU','T_Reconciliation_UU',100,TO_TIMESTAMP('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-06-06 22:47:00','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:01 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200207 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:02 PM COT
|
||||
ALTER TABLE T_Reconciliation ADD COLUMN T_Reconciliation_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jun 6, 2012 10:47:02 PM COT
|
||||
CREATE UNIQUE INDEX T_Reconciliation_UU_idx ON t_reconciliation(T_Reconciliation_UU)
|
||||
;
|
||||
|
||||
UPDATE AD_System
|
||||
SET LastMigrationScriptApplied='846_GenerateNewUUIDColumns.sql'
|
||||
WHERE LastMigrationScriptApplied<'846_GenerateNewUUIDColumns.sql'
|
||||
OR LastMigrationScriptApplied IS NULL
|
||||
;
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -576,7 +576,7 @@ UPDATE AD_PRINTFORMATITEM_TRL trl
|
|||
SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_PRINTFORMATITEM p
|
||||
WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID
|
||||
AND c.AD_Column_ID=p.AD_Column_ID AND p.AD_PrintFormatItem_ID=trl.AD_PrintFormatItem_ID),
|
||||
Updated = now()
|
||||
Updated = SYSDATE
|
||||
WHERE EXISTS (SELECT 1 FROM AD_PRINTFORMATITEM p, AD_ELEMENT_TRL e, AD_COLUMN c
|
||||
WHERE trl.AD_PrintFormatItem_ID=p.AD_PrintFormatItem_ID
|
||||
AND p.AD_Column_ID=c.AD_Column_ID
|
||||
|
|
|
@ -3,24 +3,12 @@ DECLARE
|
|||
roleaccesslevelwin VARCHAR2 (200);
|
||||
sqlins VARCHAR2 (2000);
|
||||
BEGIN
|
||||
FOR r IN (SELECT ad_role_id, userlevel, NAME
|
||||
FOR r IN (SELECT ad_role_id, userlevel, NAME, ad_client_id, ad_org_id
|
||||
FROM AD_ROLE
|
||||
WHERE ismanual = 'N'
|
||||
ORDER BY ad_role_id)
|
||||
LOOP
|
||||
DBMS_OUTPUT.PUT_LINE ('Role : ' || r.NAME || ' - ' || r.ad_role_id);
|
||||
DELETE FROM AD_WINDOW_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_PROCESS_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_FORM_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_WORKFLOW_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
IF r.userlevel = 'S ' -- system
|
||||
THEN
|
||||
roleaccesslevel := '(''4'',''7'',''6'')';
|
||||
|
@ -40,40 +28,61 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Window_Access (AD_Window_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT DISTINCT w.AD_Window_ID, '
|
||||
'INSERT INTO AD_Window_Access (AD_Window_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Window_Access_UU) SELECT DISTINCT w.AD_Window_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', SysDate,0, SysDate,0,''Y'' FROM AD_Window w INNER JOIN AD_Tab t ON (w.AD_Window_ID=t.AD_Window_ID) INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) WHERE t.SeqNo=(SELECT MIN(SeqNo) FROM AD_Tab xt WHERE xt.AD_Window_ID=w.AD_Window_ID)AND tt.AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Window w INNER JOIN AD_Tab t ON (w.AD_Window_ID=t.AD_Window_ID) INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) LEFT JOIN AD_Window_Access wa ON (wa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND w.AD_Window_ID = wa.AD_Window_ID) WHERE wa.AD_Window_ID IS NULL AND t.SeqNo=(SELECT MIN(SeqNo) FROM AD_Tab xt WHERE xt.AD_Window_ID=w.AD_Window_ID) AND tt.AccessLevel IN '
|
||||
|| roleaccesslevelwin;
|
||||
|
||||
-- DBMS_OUTPUT.PUT_LINE (sqlins);
|
||||
EXECUTE IMMEDIATE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Process_Access (AD_Process_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT DISTINCT p.AD_Process_ID, '
|
||||
'INSERT INTO AD_Process_Access (AD_Process_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Process_Access_UU) SELECT DISTINCT p.AD_Process_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', SysDate,0, SysDate,0,''Y'' FROM AD_Process p WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Process p LEFT JOIN AD_Process_Access pa ON (pa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND p.AD_Process_ID = pa.AD_Process_ID) WHERE pa.AD_Process_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
-- DBMS_OUTPUT.PUT_LINE (sqlins);
|
||||
EXECUTE IMMEDIATE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Form_Access (AD_Form_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT f.AD_Form_ID, '
|
||||
'INSERT INTO AD_Form_Access (AD_Form_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Form_Access_UU) SELECT f.AD_Form_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', SysDate,0, SysDate,0,''Y'' FROM AD_Form f WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Form f LEFT JOIN AD_Form_Access fa ON (fa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND f.AD_Form_ID = fa.AD_Form_ID) WHERE fa.AD_Form_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
-- DBMS_OUTPUT.PUT_LINE (sqlins);
|
||||
EXECUTE IMMEDIATE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_WorkFlow_Access (AD_WorkFlow_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT w.AD_WorkFlow_ID, '
|
||||
'INSERT INTO AD_WorkFlow_Access (AD_WorkFlow_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_WorkFlow_Access_UU) SELECT w.AD_WorkFlow_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', SysDate,0, SysDate,0,''Y'' FROM AD_WorkFlow w WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_WorkFlow w LEFT JOIN AD_WorkFlow_Access wa ON (wa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND w.AD_WorkFlow_ID = wa.AD_WorkFlow_ID) WHERE wa.AD_WorkFlow_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
-- DBMS_OUTPUT.PUT_LINE (sqlins);
|
||||
EXECUTE IMMEDIATE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Document_Action_Access (AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_DocType_ID, AD_Ref_List_ID, AD_Role_ID,AD_Document_Action_Access_UU) (SELECT '
|
||||
|| r.ad_client_id || ',' || r.ad_org_id
|
||||
|| ',''Y'', Current_Timestamp,0, Current_Timestamp,0, doctype.C_DocType_ID, action.AD_Ref_List_ID, rol.AD_Role_ID,generate_uuid() '
|
||||
|| ' FROM AD_Client client INNER JOIN C_DocType doctype ON (doctype.AD_Client_ID=client.AD_Client_ID) INNER JOIN AD_Ref_List action ON (action.AD_Reference_ID=135) INNER JOIN AD_Role rol ON (rol.AD_Client_ID=client.AD_Client_ID AND rol.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ') LEFT JOIN AD_Document_Action_Access da ON (da.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND da.C_DocType_ID=doctype.C_DocType_ID AND da.AD_Ref_List_ID=action.AD_Ref_List_ID) WHERE (da.C_DocType_ID IS NULL AND da.AD_Ref_List_ID IS NULL))';
|
||||
|
||||
-- DBMS_OUTPUT.PUT_LINE (sqlins);
|
||||
EXECUTE IMMEDIATE sqlins;
|
||||
END LOOP;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -5,23 +5,11 @@ DECLARE
|
|||
sqlins VARCHAR (2000);
|
||||
r RECORD;
|
||||
BEGIN
|
||||
FOR r IN (SELECT ad_role_id, userlevel, NAME
|
||||
FOR r IN (SELECT ad_role_id, userlevel, NAME, ad_client_id, ad_org_id
|
||||
FROM AD_ROLE
|
||||
WHERE ismanual = 'N'
|
||||
ORDER BY ad_role_id)
|
||||
LOOP
|
||||
DELETE FROM AD_WINDOW_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_PROCESS_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_FORM_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
DELETE FROM AD_WORKFLOW_ACCESS
|
||||
WHERE ad_role_id = r.ad_role_id;
|
||||
|
||||
IF r.userlevel = 'S ' -- system
|
||||
THEN
|
||||
roleaccesslevel := '(''4'',''7'',''6'')';
|
||||
|
@ -41,36 +29,56 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Window_Access (AD_Window_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT DISTINCT w.AD_Window_ID, '
|
||||
'INSERT INTO AD_Window_Access (AD_Window_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Window_Access_UU) SELECT DISTINCT w.AD_Window_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'' FROM AD_Window w INNER JOIN AD_Tab t ON (w.AD_Window_ID=t.AD_Window_ID) INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) WHERE t.SeqNo=(SELECT MIN(SeqNo) FROM AD_Tab xt WHERE xt.AD_Window_ID=w.AD_Window_ID)AND tt.AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Window w INNER JOIN AD_Tab t ON (w.AD_Window_ID=t.AD_Window_ID) INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) LEFT JOIN AD_Window_Access wa ON (wa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND w.AD_Window_ID = wa.AD_Window_ID) WHERE wa.AD_Window_ID IS NULL AND t.SeqNo=(SELECT MIN(SeqNo) FROM AD_Tab xt WHERE xt.AD_Window_ID=w.AD_Window_ID) AND tt.AccessLevel IN '
|
||||
|| roleaccesslevelwin;
|
||||
|
||||
EXECUTE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Process_Access (AD_Process_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT DISTINCT p.AD_Process_ID, '
|
||||
'INSERT INTO AD_Process_Access (AD_Process_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Process_Access_UU) SELECT DISTINCT p.AD_Process_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'' FROM AD_Process p WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Process p LEFT JOIN AD_Process_Access pa ON (pa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND p.AD_Process_ID = pa.AD_Process_ID) WHERE pa.AD_Process_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
EXECUTE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Form_Access (AD_Form_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT f.AD_Form_ID, '
|
||||
'INSERT INTO AD_Form_Access (AD_Form_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_Form_Access_UU) SELECT f.AD_Form_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'' FROM AD_Form f WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_Form f LEFT JOIN AD_Form_Access fa ON (fa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND f.AD_Form_ID = fa.AD_Form_ID) WHERE fa.AD_Form_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
EXECUTE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_WorkFlow_Access (AD_WorkFlow_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite) SELECT w.AD_WorkFlow_ID, '
|
||||
'INSERT INTO AD_WorkFlow_Access (AD_WorkFlow_ID, AD_Role_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadWrite,AD_WorkFlow_Access_UU) SELECT w.AD_WorkFlow_ID, '
|
||||
|| r.ad_role_id
|
||||
|| ',0,0,''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'' FROM AD_WorkFlow w WHERE AccessLevel IN '
|
||||
|| ','||r.ad_client_id||','||r.ad_org_id||',''Y'', Current_Timestamp,0, Current_Timestamp,0,''Y'',generate_uuid() FROM AD_WorkFlow w LEFT JOIN AD_WorkFlow_Access wa ON (wa.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND w.AD_WorkFlow_ID = wa.AD_WorkFlow_ID) WHERE wa.AD_WorkFlow_ID IS NULL AND AccessLevel IN '
|
||||
|| roleaccesslevel;
|
||||
|
||||
EXECUTE sqlins;
|
||||
|
||||
sqlins :=
|
||||
'INSERT INTO AD_Document_Action_Access (AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,C_DocType_ID, AD_Ref_List_ID, AD_Role_ID,AD_Document_Action_Access_UU) (SELECT '
|
||||
|| r.ad_client_id || ',' || r.ad_org_id
|
||||
|| ',''Y'', Current_Timestamp,0, Current_Timestamp,0, doctype.C_DocType_ID, action.AD_Ref_List_ID, rol.AD_Role_ID,generate_uuid() '
|
||||
|| ' FROM AD_Client client INNER JOIN C_DocType doctype ON (doctype.AD_Client_ID=client.AD_Client_ID) INNER JOIN AD_Ref_List action ON (action.AD_Reference_ID=135) INNER JOIN AD_Role rol ON (rol.AD_Client_ID=client.AD_Client_ID AND rol.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ') LEFT JOIN AD_Document_Action_Access da ON (da.AD_Role_ID='
|
||||
|| r.ad_role_id
|
||||
|| ' AND da.C_DocType_ID=doctype.C_DocType_ID AND da.AD_Ref_List_ID=action.AD_Ref_List_ID) WHERE (da.C_DocType_ID IS NULL AND da.AD_Ref_List_ID IS NULL))';
|
||||
|
||||
EXECUTE sqlins;
|
||||
END LOOP;
|
||||
|
||||
END;
|
||||
|
|
|
@ -1 +1 @@
|
|||
843-IDEMPIERE-13.sql
|
||||
847_FillNewUUIDs.sql
|
||||
|
|
Loading…
Reference in New Issue