From 2f7f4bce6823fbcc0266fdf8a5bd57f52ed3d13e Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:48:50 +0530 Subject: [PATCH] MOSIP-32453 : Updated rollback scripts (#1131) Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mosip_master/sql/1.2.1.0_to_1.3.0_rollback.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db_upgrade_scripts/mosip_master/sql/1.2.1.0_to_1.3.0_rollback.sql b/db_upgrade_scripts/mosip_master/sql/1.2.1.0_to_1.3.0_rollback.sql index 5deb76a9f4..c509cd7993 100644 --- a/db_upgrade_scripts/mosip_master/sql/1.2.1.0_to_1.3.0_rollback.sql +++ b/db_upgrade_scripts/mosip_master/sql/1.2.1.0_to_1.3.0_rollback.sql @@ -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