Yonben
02/13/2022, 4:05 PMsupabase migration new <name>
and wrote my migration, but when I try to supabase db push
it I get the following:
ā¶ supabase db push
\Applying unapplied migrations...
Error: ERROR: must be owner of table summoners (SQLSTATE 42501)
Now if I look at the initial "remote_commit" migration, it states the owner is supabase_admin
but it also granted ALL
on the table, so I'm confused š¤·š»āāļø
ALTER TABLE IF EXISTS public.summoners
OWNER to supabase_admin;
ALTER TABLE IF EXISTS public.summoners
ENABLE ROW LEVEL SECURITY;
GRANT ALL ON TABLE public.summoners TO anon;
GRANT ALL ON TABLE public.summoners TO authenticated;
GRANT ALL ON TABLE public.summoners TO postgres;
GRANT ALL ON TABLE public.summoners TO service_role;
GRANT ALL ON TABLE public.summoners TO supabase_admin;
If I run the query on the UI, and then do a remote commit
I get a really weirdly generated migration so I'd like to avoid the unnecessary overhead from these:
REVOKE ALL ON TABLE public.summoners FROM anon;
REVOKE ALL ON TABLE public.summoners FROM authenticated;
REVOKE ALL ON TABLE public.summoners FROM postgres;
REVOKE ALL ON TABLE public.summoners FROM service_role;
REVOKE ALL ON TABLE public.summoners FROM supabase_admin;
GRANT ALL ON TABLE public.summoners TO anon;
GRANT ALL ON TABLE public.summoners TO authenticated;
GRANT ALL ON TABLE public.summoners TO postgres;
GRANT ALL ON TABLE public.summoners TO service_role;
GRANT ALL ON TABLE public.summoners TO supabase_admin;
Yonben
02/13/2022, 4:36 PMALTER TABLE IF EXISTS public.summoners
OWNER to postgres;
But this lack of sync between local dev and the ui (which is pretty powerful and useful) is annoying. The issue should be considered imo š Thanks!