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
pgroll doesn't currently support migrating triggers. It's not something that we currently have plans to add. The full list of supported operations is in the docs. There is always the 'escape hatch' of using a raw SQL migration however, which can be used to create whatever kind of database object you need.
During a migration that alters an existing column or adds a new one, pgroll installs up to two triggers on the affected table, named according to this pattern:
_pgroll_trigger_<table-name>_<column-name> BEFORE INSERT OR UPDATE ON <table> FOR EACH ROW EXECUTE FUNCTION _pgroll_trigger_<table-name>_<column-name>()
In the presence of another BEFORE INSERT OR UPDATE trigger on the same table, Postgres will run the triggers in alphabetical order by trigger name, so interaction between triggers on the same table is possible. If this becomes an issue we may need a way to control the naming of pgroll triggers.
Will there be support for migrating triggers? Also, can pre-existing or new triggers interfere at all with the migration process?
The text was updated successfully, but these errors were encountered: