forked from mosip/partner-management-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOSIP-39575 added missing upgrade and rollback scripts
Signed-off-by: kameshsr <[email protected]>
- Loading branch information
Showing
18 changed files
with
572 additions
and
465 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
db_upgrade_scripts/mosip_pms/sql/1.1.5.5_to_1.2.0.1-B1_pms-authdevice-support.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
\COPY authdevice.device_detail TO 'dml/auth-device_detail.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select sbi.id,sbi.sw_binary_hash,sbi.sw_version,sbi.sw_cr_dtimes,sbi.sw_expiry_dtimes,sbi.approval_status,sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes,dd.dprovider_id,dd.partner_org_name from authdevice.secure_biometric_interface sbi inner join authdevice.device_detail dd on device_detail_id = dd.id) TO 'dml/auth-secure_biometric_interface.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select sbi.id,sbi.sw_binary_hash,sbi.sw_version,sbi.sw_cr_dtimes,sbi.sw_expiry_dtimes,sbi.approval_status,sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes,sbi.eff_dtimes,dd.dprovider_id,dd.partner_org_name from authdevice.secure_biometric_interface_h sbi inner join authdevice.device_detail dd on device_detail_id = dd.id) TO 'dml/auth-secure_biometric_interface_h.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY authdevice.ftp_chip_detail TO 'dml/auth-ftp_chip_detail.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select dd.dprovider_id,dd.partner_org_name,dd.id,sbi.id,sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes from authdevice.secure_biometric_interface sbi inner join authdevice.device_detail dd on device_detail_id = dd.id) TO 'dml/auth-device_detail_sbi.csv' WITH (FORMAT CSV, HEADER); | ||
|
10 changes: 10 additions & 0 deletions
10
db_upgrade_scripts/mosip_pms/sql/1.1.5.5_to_1.2.0.1-B1_pms-regdevice-support.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
\COPY regdevice.device_detail TO 'dml/reg-device_detail.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select sbi.id,sbi.sw_binary_hash,sbi.sw_version,sbi.sw_cr_dtimes,sbi.sw_expiry_dtimes,sbi.approval_status,sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes,dd.dprovider_id,dd.partner_org_name from regdevice.secure_biometric_interface sbi inner join regdevice.device_detail dd on sbi.device_detail_id = dd.id) TO 'dml/reg-secure_biometric_interface.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select sbi.id,sbi.sw_binary_hash,sbi.sw_version,sbi.sw_cr_dtimes,sbi.sw_expiry_dtimes,sbi.approval_status,sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes,sbi.eff_dtimes,dd.dprovider_id,dd.partner_org_name from regdevice.secure_biometric_interface_h sbi inner join regdevice.device_detail dd on sbi.device_detail_id = dd.id) TO 'dml/reg-secure_biometric_interface_h.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY regdevice.ftp_chip_detail TO 'dml/reg-ftp_chip_detail.csv' WITH (FORMAT CSV, HEADER); | ||
|
||
\COPY (select dd.dprovider_id,dd.partner_org_name,dd.id,sbi.id, sbi.is_active,sbi.cr_by,sbi.cr_dtimes,sbi.upd_by,sbi.upd_dtimes,sbi.is_deleted,sbi.del_dtimes from regdevice.secure_biometric_interface sbi inner join regdevice.device_detail dd on device_detail_id = dd.id) TO 'dml/reg-device_detail_sbi.csv' WITH (FORMAT CSV, HEADER); | ||
|
18 changes: 18 additions & 0 deletions
18
db_upgrade_scripts/mosip_pms/sql/1.1.5.5_to_1.2.0.1-B1_rollback.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
\c mosip_pms | ||
|
||
REASSIGN OWNED BY postgres TO sysadmin; | ||
|
||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA pms TO sysadmin; | ||
|
||
DROP TABLE IF EXISTS pms.device_detail; | ||
DROP TABLE IF EXISTS pms.device_detail_sbi; | ||
DROP TABLE IF EXISTS pms.ftp_chip_detail; | ||
DROP TABLE IF EXISTS pms.reg_device_sub_type; | ||
DROP TABLE IF EXISTS pms.reg_device_type; | ||
DROP TABLE IF EXISTS pms.secure_biometric_interface; | ||
DROP TABLE IF EXISTS pms.secure_biometric_interface_h; | ||
|
||
ALTER TABLE pms.partner_policy DROP COLUMN label; | ||
ALTER TABLE pms.partner DROP COLUMN lang_code; | ||
ALTER TABLE pms.partner_h DROP COLUMN lang_code; | ||
|
Oops, something went wrong.