Make migration policy creation idempotent
DROP POLICY IF EXISTS before CREATE POLICY so migrations can be re-applied to a DB that already has the policy (e.g. demo_config was manually applied before migration tracking was set up).
This commit is contained in:
@@ -15,4 +15,5 @@ CREATE TABLE IF NOT EXISTS public.user_api_keys (
|
||||
);
|
||||
|
||||
ALTER TABLE public.user_api_keys ENABLE ROW LEVEL SECURITY;
|
||||
DROP POLICY IF EXISTS "service only" ON public.user_api_keys;
|
||||
CREATE POLICY "service only" ON public.user_api_keys USING (false);
|
||||
|
||||
Reference in New Issue
Block a user