Skip to content

Commit

Permalink
MOSIP-16456 Remove pk constraint from blacklisted words table"
Browse files Browse the repository at this point in the history
  • Loading branch information
rambhatt1591 authored and ckm007 committed Aug 11, 2021
1 parent 7019848 commit 40e3203
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,25 @@
-- Apr-2021 Ram Bhatt Creation of master.permitted_local_config
-- May-2021 Ram Bhatt Changed Precision and size of version and identity_schema_version
-- Jul-2021 Ram Bhatt Creation of blocklisted table
-- Aug-2021 Ram Bhatt Remove primary key constraint from blacklisted table
-- ------------------------------------------------------------------------------------------------------------
--------------------------------------------UI SPEC TABLE CREATION-----------------------------------------------

\c mosip_master sysadmin
-----------------------------------------------------------------------------------------------------------------------

ALTER TABLE master.blacklisted_words DROP CONSTRAINT IF EXISTS pk_blwrd_code CASCADE;
-------------------------------------------------------------------------------------------------------------------
\ir ../ddl/master-ui_spec.sql
\ir ../ddl/master-blocklisted_words.sql


----- TRUNCATE master.blocklisted_words TABLE Data and It's reference Data and COPY Data from CSV file -----
TRUNCATE TABLE master.blocklisted_words cascade ;

\COPY master.blocklisted_words (word,descr,lang_code,is_active,cr_by,cr_dtimes) FROM './dml/master-blocklisted_words.csv' delimiter ',' HEADER csv;


--------------------------------------------UI SPEC TABLE CREATION-----------------------------------------------
TRUNCATE TABLE master.ui_spec cascade ;

---------------------------------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions db_scripts/mosip_master/ddl/master-blacklisted_words.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
-- ------------------------------------------------------------------------------------------
-- Jan-2021 Ram Bhatt Set is_deleted flag to not null and default false
-- Mar-2021 Ram Bhatt Reverting is_deleted not null changes
-- Jul-2021 Ram Bhatt Remove Primary Key Constraint
-- ------------------------------------------------------------------------------------------

-- object: master.blacklisted_words | type: TABLE --
Expand All @@ -24,8 +25,7 @@ CREATE TABLE master.blacklisted_words(
upd_by character varying(256),
upd_dtimes timestamp,
is_deleted boolean DEFAULT FALSE,
del_dtimes timestamp,
CONSTRAINT pk_blwrd_code PRIMARY KEY (word,lang_code)
del_dtimes timestamp

);
-- ddl-end --
Expand Down

0 comments on commit 40e3203

Please sign in to comment.