`supabase db dump`: no triggers in output
How can I dump triggers (CREATE TRIGGER statements with supabase db dump)?
Tried with and without --data-only argument.
On the other side, pg_dump dumps triggers perfectly.
Why is it better to use supabase db dump instead of pg_dump at all?
Also supabase db dump doesn't dump migrations
(but it can be dumped separately with supabase db dump --data-only --schema supabase_migrations)
Version
"supabase": "1.115.5"
Are you triggers defined in auth or storage schema? Those are ignored by default so you need to pass in the schema flag directly, ie.
supabase db dump --schema auth
Why is it better to use supabase db dump instead of pg_dump at all?
db dump uses pg_dump behind the scenes but with extra flags to ignore supabase managed schemas. This is essential for future compatibility when upgrading to newer versions of services, like gotrue or realtime.