Replay out of sequence migrations #50
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-dbi#50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now that the schema file is a thing of the past, we should be able to reply migration files out of sequence. This DOES NOT mean out of order.
Basically, the thing this is trying to fix is if your schema is in some sort of version control, such as git, and developers create migration files in two separate branches. As long as there are no collisions or conflicts, this should be perfectly OK to do. What we will be able to do here is scan the schema_info table and find out which migrations are missing and replay them individually. This means that if a migration gets missed, for example because it's version is earlier than a migration from another branch but that branch is merged into a master branch first, we will be able to reply it and catch up.
The caveat here is that if a snapshot is being created, the database still has to be in the last known latest version. There may also be problems if migrations refer to the same elements, but even this will be fairly fault tollerant.
mentioned in merge request !22
created merge request !22 to address this issue
closed via merge request !22
mentioned in commit
04ebecf1eb