From ae9937505bd99dd0d245fd7306717ddd241c7ebd Mon Sep 17 00:00:00 2001 From: rambhatt1591 Date: Wed, 24 Nov 2021 11:16:33 +0530 Subject: [PATCH] MOSIP-16182 Composite unique key for ca cert store --- db_release_scripts/mosip_ida/sql/1.2_ida-scripts_release.sql | 2 +- db_scripts/mosip_ida/ddl/ida-ca_cert_store.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db_release_scripts/mosip_ida/sql/1.2_ida-scripts_release.sql b/db_release_scripts/mosip_ida/sql/1.2_ida-scripts_release.sql index 8cdf90dd24c..9b7e4013f21 100644 --- a/db_release_scripts/mosip_ida/sql/1.2_ida-scripts_release.sql +++ b/db_release_scripts/mosip_ida/sql/1.2_ida-scripts_release.sql @@ -54,7 +54,7 @@ CREATE INDEX ind_uhs_id ON ida.uin_hash_salt (id); ----------------------------------------------------------------------------------------------------------- ALTER TABLE ida.key_alias ADD COLUMN cert_thumbprint character varying(100); -ALTER TABLE ida.ca_cert_store ADD CONSTRAINT cert_thumbprint_unique UNIQUE (cert_thumbprint); +ALTER TABLE ida.ca_cert_store ADD CONSTRAINT cert_thumbprint_unique UNIQUE (cert_thumbprint,partner_domain); diff --git a/db_scripts/mosip_ida/ddl/ida-ca_cert_store.sql b/db_scripts/mosip_ida/ddl/ida-ca_cert_store.sql index d7ae3afdaf5..7ee1be134bf 100644 --- a/db_scripts/mosip_ida/ddl/ida-ca_cert_store.sql +++ b/db_scripts/mosip_ida/ddl/ida-ca_cert_store.sql @@ -33,7 +33,7 @@ CREATE TABLE ida.ca_cert_store( is_deleted boolean DEFAULT FALSE, del_dtimes timestamp, CONSTRAINT pk_cacs_id PRIMARY KEY (cert_id), - CONSTRAINT cert_thumbprint_unique UNIQUE (cert_thumbprint) + CONSTRAINT cert_thumbprint_unique UNIQUE (cert_thumbprint,partner_domain) ); -- ddl-end --