From e1ecb4d9715ea2d9cd9b37ab83109601d5abfb84 Mon Sep 17 00:00:00 2001 From: Loganathan Sekar Date: Mon, 12 Feb 2024 11:54:19 +0530 Subject: [PATCH] Updated db scripts Signed-off-by: Loganathan Sekar --- db_scripts/mosip_ida/ddl/ida-otp_transaction.sql | 2 +- .../mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_rollback.sql | 5 +++++ .../mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_upgrade.sql | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/db_scripts/mosip_ida/ddl/ida-otp_transaction.sql b/db_scripts/mosip_ida/ddl/ida-otp_transaction.sql index 8dc9662eb95..b8bd882b92f 100644 --- a/db_scripts/mosip_ida/ddl/ida-otp_transaction.sql +++ b/db_scripts/mosip_ida/ddl/ida-otp_transaction.sql @@ -32,7 +32,7 @@ CREATE TABLE ida.otp_transaction( ); -- ddl-end -- --index section starts---- -CREATE INDEX ind_otphsh ON ida.otp_transaction (otp_hash,status_code); +CREATE INDEX ind_refid ON ida.otp_transaction (ref_id,status_code); --index section ends------ COMMENT ON TABLE ida.otp_transaction IS 'OTP Transaction: All OTP related data and validation details are maintained here for ID Authentication module.'; -- ddl-end -- diff --git a/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_rollback.sql b/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_rollback.sql index 1ea8a6e97f2..37b4fb58b16 100644 --- a/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_rollback.sql +++ b/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_rollback.sql @@ -1,3 +1,8 @@ \echo 'Upgrade Queries not required for the transition from 1.2.0.1-B5 to 1.2.0.1' ALTER TABLE ida.credential_event_store ALTER COLUMN credential_transaction_id type character varying(36); + +CREATE INDEX ind_otphsh ON ida.otp_transaction (otp_hash,status_code); + +DROP INDEX IF EXISTS ida.ind_refid; + diff --git a/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_upgrade.sql b/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_upgrade.sql index 36efab138ca..39f231307f5 100644 --- a/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_upgrade.sql +++ b/db_upgrade_scripts/mosip_ida/sql/1.2.0.1-B5_to_1.2.0.1_upgrade.sql @@ -1,3 +1,8 @@ \echo 'Upgrade Queries not required for transition from 1.2.0.1-B5 to 1.2.0.1' ALTER TABLE ida.credential_event_store ALTER COLUMN credential_transaction_id type character varying(64); + +DROP INDEX IF EXISTS ida.ind_otphsh; + +CREATE INDEX ind_refid ON ida.otp_transaction (ref_id,status_code); +