4 ms·
Our migrations have unique datetime stamps. Stamps and migration names go into a table. We do have a hash of all of the contents of the table, but the schema
by px1999 10y ago
Our migrations have unique datetime stamps. Stamps and migration names go into a table.
We do have a hash of all of the contents of the table, but the schema "version" is just the list of migrations that have been run. We run many different instances of our applications on several different "versions" and from time to time pull individual migrations back into earlier releases for hotfixes etc. The overall version is the instance, environment, and this hash.
Practically speaking, when we're handling the files ourselves though, it's instance, environment and backup date.
There are edge cases and it's not perfect (around ordering mostly), but it's incredibly rare for us to run into issues with this schema / data migration approach. We've found that even with a bunch of environments and a couple thousand migrations, data versioning isn't that serious a problem for us.
- webmaven 10y agoSo, the versioning of the data is basically by the backup date (plus pointers to the relevant schema, etc.), correct?