Record hash of applied migrations
|Reported by:||Owned by:|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Simple list spec:
- After an migration has been applied its hash is stored in the migration table
- The hash value could probably just be a file hash of the migration python source file
- Before new migrations are applied all previous migrations should be checked to not only have the correct id but also the same content.
- Migration modification without triggering any hash errors (like documentation only updates) can be supported using a hash property on the migration model that allows the developer to let the migration keep its previous hash.
- An --force-update-migration-hash option can be added the migration command for an explicit "i don't care' situation.
I've seen this other database migration frameworks and it has been a very useful thing to have at times.