dukcapil/migrations/000029_update_incoming_letter_department_recipients.up.sql
2025-09-08 12:24:37 +07:00

18 lines
616 B
PL/PgSQL

BEGIN;
-- Delete old setting if exists
DELETE FROM app_settings WHERE key = 'INCOMING_LETTER_RECIPIENTS';
-- Insert new setting with department IDs as a direct array
-- Using empty array as placeholder that should be replaced with actual department IDs
INSERT INTO app_settings(key, value)
VALUES
('INCOMING_LETTER_DEPARTMENT_RECIPIENTS', '[]'::jsonb)
ON CONFLICT (key) DO NOTHING;
-- Example to set actual department IDs (uncomment and modify as needed):
-- UPDATE app_settings
-- SET value = '["ae66af10-bcb7-4939-8110-940d2a387e19"]'::jsonb
-- WHERE key = 'INCOMING_LETTER_DEPARTMENT_RECIPIENTS';
COMMIT;