Declarative DB - Trigger isn't written into migration file
Good morning! I'm using declarative database, and then creating the migration files following the steps in https://supabase.com/docs/guides/local-development/declarative-database-schemas. I was successful with initially setting up a table, and now I'm adding RLS and a trigger function on the table. RLS alteration and policy looks good in the migration script, but then I had some issues with the trigger function.
1) Before defining the function,
2) The trigger wasn't written at all. The function looks good (Separately, the
Thank you for your help (or even just a "dunno.")!
1) Before defining the function,
set check_function_bodies = off; was set. Makes general sense to set this, but then it isn't turned back to on in the migration script. Based on my limited research, this seems like something that should be reset - does Supabase do this silently, or does it have a different approach here?2) The trigger wasn't written at all. The function looks good (Separately, the
$$; at the end is replaced with $function$; with a new line before the semi-colon, but I assume this is WAI) --- but the trigger isn't written at all. https://supabase.com/docs/guides/local-development/declarative-database-schemas#known-caveats doesn't list anything about issues with triggers, so I don't know if this is a glitch. For the format of a migration file, I assume I paste the trigger as it's written in the *.sql, but no idea how alterations will be written in the future. Any advice?Thank you for your help (or even just a "dunno.")!
Manage your database schemas in one place and generate versioned migrations.
