diff --git a/utilities/project-factory/migration/main/V20240625141100__process_details_ddl.sql b/utilities/project-factory/migration/main/V20240625141100__process_details_ddl.sql index e7b4037bd8d..6a3d7807fb3 100644 --- a/utilities/project-factory/migration/main/V20240625141100__process_details_ddl.sql +++ b/utilities/project-factory/migration/main/V20240625141100__process_details_ddl.sql @@ -1,4 +1,4 @@ -CREATE TABLE health.eg_cm_campaign_process ( +CREATE TABLE eg_cm_campaign_process ( id VARCHAR(128) PRIMARY KEY, campaignId VARCHAR(128) NOT NULL, type VARCHAR(128), @@ -7,5 +7,5 @@ CREATE TABLE health.eg_cm_campaign_process ( createdtime BIGINT, lastmodifiedtime BIGINT, additionaldetails JSONB, - CONSTRAINT fk_campaignId FOREIGN KEY (campaignId) REFERENCES health.eg_cm_campaign_details(id) + CONSTRAINT fk_campaignId FOREIGN KEY (campaignId) REFERENCES eg_cm_campaign_details(id) ); diff --git a/utilities/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql b/utilities/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql index d9bfbd0af53..b1be686a855 100644 --- a/utilities/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql +++ b/utilities/project-factory/migration/main/V20240731162600__add_uniqiue_constraint_process_track.sql @@ -1,6 +1,6 @@ -- Step 1: Remove duplicate rows DELETE FROM eg_cm_campaign_process a -USING health.eg_cm_campaign_process b +USING eg_cm_campaign_process b WHERE a.id < b.id AND a.campaignId = b.campaignId AND a.type = b.type;