Tampering resistance by storing the migrations' hashes #367
marton78
started this conversation in
Feature Ideas
Replies: 1 comment 3 replies
-
This would add a lot of complexity to dbmate, and I'm not convinced that it is necessary. In a typical software development workflow, it's easy to avoid this situation by simply never editing migration files that have already been committed to your master/main branch (other than whitespace/formatting changes, which are safe but would break with this feature). Is there a particular workflow you are concerned about, or could you explain more about the real world issues you are seeing due to the lack of this feature? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
great project, it ticks off all of my requirements for a light weight migrations tool, but the following:
The table of applied migrations should contain a column for the hash of each migrations file
This prevents applying a chain of migrations if an already applied migration file has different contents than previously seen. See e.g. node-postgres-migrations for an example where this is implemented.
Additionally, migrations should always be applied in order, so a database with the migrations
100_foo
and200_bar
should refuse to apply150_baz
.Beta Was this translation helpful? Give feedback.
All reactions