-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assert compatible schema version in data #6
Comments
I'm not sure I understand this issue. By, "schema version", you mean the schema of the database, or are you referring to some sort of YAML schema? When you say, "roll back to that version", does that mean rolling back migrations and then reapplying them over the imported data, or just checking out the old schema using git, or something else completely? |
I mean database schema. I don't have a prescriptive approach but I think a reasonable approach is rolling back to said schema migration, importing live fixtures, then rolling forward. E.g. On import: if import fails (or maybe always) roll back to the saved schema version. run import. roll forward. |
I can see how this approach would be really useful in the context of a Ms Teacher import as part of the seeding of a local db, but I wonder what it would mean in the context of an import into a production db (ie creation of a new demo teacher). Would it potentially rollback slow migrations and break the site for other users while the import was in progress? Does it seems feasible to build tooling to migrate fixtures? Maybe like:
I dunno. Maybe the short-term solution is: |
in order to not invalidate fixtures with a moving schema
set a "compatible schema version"
and have live fixtures roll back to that version before loading
The text was updated successfully, but these errors were encountered: