chore: establish local platform baseline
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE IF EXISTS consent_record;
|
||||
DROP TABLE IF EXISTS subject_fact;
|
||||
|
||||
ALTER TABLE subject_profile
|
||||
DROP CONSTRAINT IF EXISTS subject_profile_created_by_tenant_fk,
|
||||
DROP CONSTRAINT IF EXISTS subject_profile_updated_by_tenant_fk,
|
||||
DROP CONSTRAINT IF EXISTS subject_profile_status_check;
|
||||
|
||||
UPDATE subject_profile SET status='inactive' WHERE status='suspended';
|
||||
UPDATE subject_profile SET status='deleted' WHERE status='deleting';
|
||||
|
||||
ALTER TABLE subject_profile
|
||||
DROP COLUMN IF EXISTS language,
|
||||
DROP COLUMN IF EXISTS timezone,
|
||||
DROP COLUMN IF EXISTS profile_data,
|
||||
DROP COLUMN IF EXISTS conversation_preferences,
|
||||
DROP COLUMN IF EXISTS created_by,
|
||||
DROP COLUMN IF EXISTS updated_by,
|
||||
ADD CONSTRAINT subject_profile_status_check
|
||||
CHECK (status IN ('active', 'inactive', 'deleted'));
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user