Skip to content

Commit

Permalink
MOSIP-32453 : Updated rollback scripts (#1131)
Browse files Browse the repository at this point in the history
Signed-off-by: GOKULRAJ136 <[email protected]>
  • Loading branch information
GOKULRAJ136 authored Dec 2, 2024
1 parent bd7581a commit 2f7f4bc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
-- Rollback script for master.app_detail
INSERT INTO master.app_detail SELECT * FROM master.app_detail_bkp;
ALTER TABLE master.app_detail ALTER COLUMN lang_code SET NOT NULL;
ALTER TABLE master.app_detail DROP CONSTRAINT pk_appdtl_id;
ALTER TABLE master.app_detail ADD CONSTRAINT pk_appdtl_id PRIMARY KEY (id, lang_code);
INSERT INTO master.app_detail SELECT * FROM master.app_detail_bkp WHERE lang_code !='eng';
DROP TABLE IF EXISTS master.app_detail_bkp;

-- Rollback script for master.biometric_attribute
INSERT INTO master.biometric_attribute SELECT * FROM master.biometric_attribute_bkp;
ALTER TABLE master.biometric_attribute ALTER COLUMN lang_code SET NOT NULL;
ALTER TABLE master.biometric_attribute DROP CONSTRAINT pk_bmattr_code;
ALTER TABLE master.biometric_attribute ADD CONSTRAINT pk_bmattr_code PRIMARY KEY (code, lang_code);
INSERT INTO master.biometric_attribute SELECT * FROM master.biometric_attribute_bkp WHERE lang_code !='eng';
DROP TABLE IF EXISTS master.biometric_attribute_bkp;

-- Rollback script for master.module_detail
INSERT INTO master.module_detail SELECT * FROM master.module_detail_bkp;
ALTER TABLE master.module_detail ALTER COLUMN lang_code SET NOT NULL;
ALTER TABLE master.module_detail DROP CONSTRAINT pk_moddtl_code;
ALTER TABLE master.module_detail ADD CONSTRAINT pk_moddtl_code PRIMARY KEY (id, lang_code);
INSERT INTO master.module_detail SELECT * FROM master.module_detail_bkp WHERE lang_code !='eng';
DROP TABLE IF EXISTS master.module_detail;

-- Rollback script for master.template_file_format
INSERT INTO master.template_file_format SELECT * FROM master.template_file_format_bkp;
ALTER TABLE master.template DROP CONSTRAINT IF EXISTS fk_tmplt_tffmt CASCADE;
ALTER TABLE master.template_file_format ALTER COLUMN lang_code SET NOT NULL;
ALTER TABLE master.template_file_format DROP CONSTRAINT pk_tffmt_code;
ALTER TABLE master.template_file_format ADD CONSTRAINT pk_tffmt_code PRIMARY KEY (code, lang_code);
INSERT INTO master.template_file_format SELECT * FROM master.template_file_format_bkp WHERE lang_code !='eng';
DROP TABLE IF EXISTS master.template_file_format;

-- Rollback script for master.template
Expand Down

0 comments on commit 2f7f4bc

Please sign in to comment.