Files
Memoh/db/migrations/0066_acl_default_allow.down.sql
T
BBQ 60517bc2a6 feat(acl): add bot security policy presets
Initialize new bots with preset ACL templates and an allow-by-default fallback so common access setups can be selected during bot creation instead of being configured manually afterward.
2026-04-14 05:51:38 +08:00

15 lines
347 B
SQL

-- 0066_acl_default_allow
-- Restore the bot ACL default effect to deny for newly created bots.
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM information_schema.columns
WHERE table_name = 'bots' AND column_name = 'acl_default_effect'
) THEN
ALTER TABLE bots
ALTER COLUMN acl_default_effect SET DEFAULT 'deny';
END IF;
END $$;