Add a strict
option to ensure migration step content was not changed
#1138
Labels
Milestone
strict
option to ensure migration step content was not changed
#1138
Description
Add a
strict
option to ensure that the produced SQL content of a migration step was not changed along the migration history, so neither project contributors ornode-pg-migrate
itself does not produce suddenly conflicting intermediate migration steps.e.g. when there is a major
node-pg-migrate
update, it could happen that produced SQL changed.Maybe it is just a renaming of a default type like
decimal <-> numeric
or a project contributor accidentally touched a migration file that was already rolled out to a prod DB.Suggested solution
The
strict
option adds the normalized SQL content of a migration step as e.g. md5 hash into the migration table in a new column.If the strict mode is enabled, the content is always checked before running new migrations to ensure that the content did not changed.
Additionally there should be a regenerate hash functionality so it is possible to force-override wanted changes.
Alternative
The
strict
naming is still up for rename.Additional context
No response
The text was updated successfully, but these errors were encountered: