Skip to content
Discussion options

You must be logged in to vote

Hey there, @Petucci 👋

Good question! By design, Hasura creates Event Triggers after running migrations because the migration process can alter tables, which impacts trigger definitions. This means any data inserted during the migration process won't trigger events because the triggers aren't set up yet.

The cleanest solution here is to create the triggers manually using SQL before running the migration. This ensures that the triggers are in place before any data is inserted.

You should be able to do this by adding a custom SQL migration that directly creates the triggers using CREATE TRIGGER in SQL.

If you make sure this custom migration runs before any data insertion takes place, then th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Petucci
Comment options

Answer selected by Petucci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants