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;