/** 
 * <feature scope="SanteDB.Persistence.Data.ADO" id="20211111-01" name="Update:20211111-01" applyRange="1.1.0.0-1.2.0.0"  invariantName="npgsql">
 *	<summary>Update: Add PURGED status key</summary>
 *	<remarks>Adds status key PURGED to the database</remarks>
 *	<isInstalled>select ck_patch('20211111-01')</isInstalled>
 * </feature>
 */
 BEGIN TRANSACTION;
INSERT INTO CD_TBL (CD_ID, IS_SYS) VALUES ('0BBEC253-21A1-49CB-B376-7FE4D0592CDA', TRUE) ON CONFLICT DO NOTHING;
INSERT INTO CD_VRSN_TBL (CD_ID, STS_CD_ID, CLS_ID, CRT_PROV_ID, CRT_UTC, MNEMONIC) VALUES ('0BBEC253-21A1-49CB-B376-7FE4D0592CDA', 'C8064CBD-FA06-4530-B430-1A52F1530C27', '54B93182-FC19-47A2-82C6-089FD70A4F45', 'fadca076-3690-4a6e-af9e-f1cd68e8c7e8', CURRENT_TIMESTAMP, 'INACTIVE') ON CONFLICT DO NOTHING;
INSERT INTO CD_NAME_TBL (CD_ID, EFFT_VRSN_SEQ_ID, LANG_CS, VAL) 
	SELECT '0BBEC253-21A1-49CB-B376-7FE4D0592CDA', vrsn_seq_id, 'EN', 'Inactive'
	FROM CD_VRSN_TBL WHERE CD_ID = '0BBEC253-21A1-49CB-B376-7FE4D0592CDA' ON CONFLICT DO NOTHING;
INSERT INTO CD_SET_MEM_ASSOC_TBL  (CD_ID, SET_ID) VALUES ('0BBEC253-21A1-49CB-B376-7FE4D0592CDA', '93A48F6A-6808-4C70-83A2-D02178C2A883') ON CONFLICT DO NOTHING;
INSERT INTO CD_SET_MEM_ASSOC_TBL  (CD_ID, SET_ID) VALUES ('0BBEC253-21A1-49CB-B376-7FE4D0592CDA', 'AAE906AA-27B3-4CDB-AFF1-F08B0FD31E59') ON CONFLICT DO NOTHING;
INSERT INTO CD_SET_MEM_ASSOC_TBL  (CD_ID, SET_ID) VALUES ('0BBEC253-21A1-49CB-B376-7FE4D0592CDA', 'C7578340-A8FF-4D7D-8105-581016324E68') ON CONFLICT DO NOTHING;
COMMIT;
SELECT REG_PATCH('20211111-01');
