Skip to content
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

Closed
petrus-v opened this issue Oct 4, 2018 · 1 comment
Closed

Upgrade consistency #60

petrus-v opened this issue Oct 4, 2018 · 1 comment
Assignees
Milestone

Comments

@petrus-v
Copy link
Contributor

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.

@jssuzanne
Copy link
Member

waiting #71

@jssuzanne jssuzanne added this to the 1.0.0 milestone Nov 8, 2018
@jssuzanne jssuzanne self-assigned this Nov 8, 2018
@jssuzanne jssuzanne modified the milestones: 1.0.0, 0.21.0 Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants