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

Upgrade consistency #60

petrus-v opened this Issue Oct 4, 2018 · 0 comments


None yet
1 participant

petrus-v commented Oct 4, 2018

This is a kind of proposal to add some consistency between auto migration and upgrade features.

If I properly understood, today auto-migration is done while starting the service whatever you ask for upgrading the database. In that case the update method is not called.

The update method allow to manage data between 2 blok version.

I feel likes changing SQL schema shouldn't be done without asking the administrator. Imagine you start to get a huge project with dependencies, the database is requested by multiple application that aware of the SQL schema for reporting or so on. If the schema changed by a community blok you want to konw as soon as possible that models changed and you'll have to adapt your reporting before deploy in production.

Then if schema is properly update without calling update method I wonder how the administrator will notice that he forgot to run anyblok_upgrade which can let the database in an inconsistency state unexpected in the blok code.

The proposal is to upgrade schema explicitly not silently and make sure update method is called while changing the schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment