You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if postgres trigger was created with supabase migrations
example:
create function public.new_user()
returns trigger
language plpgsql
security definer set search_path = ''
as $$
begin
******
return new;
end;
$$;
create trigger on_auth_user_created
after insert on auth.users
for each row execute procedure public.new_user();
supabase db diff --linked --schema auth,storage shows no DIFF as it always apply all migrations to make diff !
also looks that we can not use supabase db diff in Gitlab Cloud CI as it requires docker host network
as workaround we can dump "auth" schema how @sweatybridge proposed here #1726 (comment)
but in this case we have conflict (non-Idempotent parts for backup restore)
example
CREATE TYPE "auth"."aal_level" AS ENUM (
'aal1',
'aal2',
'aal3'
);
CREATE TYPE "auth"."code_challenge_method" AS ENUM (
's256',
'plain'
);
Describe the bug
No clear approach how to restore DB when triggers added to "auth" schema
https://supabase.com/docs/guides/platform/migrating-within-supabase/backup-restore#schema-changes-to-auth-and-storage
if postgres trigger was created with supabase migrations
example:
supabase db diff --linked --schema auth,storage
shows no DIFF as it always apply all migrations to make diff !also looks that we can not use
supabase db diff
in Gitlab Cloud CI as it requires docker host networkas workaround we can dump "auth" schema how @sweatybridge proposed here #1726 (comment)
but in this case we have conflict (non-Idempotent parts for backup restore)
example
ERROR: 42710: type "aal_level" already exists
To Reproduce
Steps to reproduce the behavior:
No Triggers restored
Expected behavior
Clear documentation (or changes in supabase cli) how to restore DB with cli
The text was updated successfully, but these errors were encountered: