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

Implement verdi database migrate #2334

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Dec 11, 2018

Fixes #2332

Up till now, the triggering of a database migration happened through
separate interfaces for the two different backends. For Django, if
the database schema did not match the code's, a warning message would
be printed asking the user to execute a stand alone python script that
was a modified Django manage.py script. For SqlAlchemy, the user was
automatically prompted with an Alembic migration.

Here we unify the migration operation by making it go through verdi
through the endpoint verdi database migrate. The error message upon
an outdated database schema and the to be executed commands are now
identical for both backends.

@coveralls
Copy link

coveralls commented Dec 11, 2018

Coverage Status

Coverage increased (+0.05%) to 68.968% when pulling 60b6feb on sphuber:fix_2332_verdi_database_migrate into c9a1d7f on aiidateam:provenance_redesign.

Up till now, the triggering of a database migration happened through
separate interfaces for the two different backends. For Django, if
the database schema did not match the code's, a warning message would
be printed asking the user to execute a stand alone python script that
was a modified Django `manage.py` script. For SqlAlchemy, the user was
automatically prompted with an Alembic migration.

Here we unify the migration operation by making it go through `verdi`
through the endpoint `verdi database migrate`. The error message upon
an outdated database schema and the to be executed commands are now
identical for both backends.
@sphuber sphuber force-pushed the fix_2332_verdi_database_migrate branch from 82fe4dd to 60b6feb Compare December 11, 2018 08:47
@sphuber sphuber merged commit 64bf428 into aiidateam:provenance_redesign Dec 11, 2018
@sphuber sphuber deleted the fix_2332_verdi_database_migrate branch December 11, 2018 09:13
@sphuber sphuber restored the fix_2332_verdi_database_migrate branch December 11, 2018 09:42
@sphuber sphuber deleted the fix_2332_verdi_database_migrate branch December 11, 2018 09:42
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

Successfully merging this pull request may close these issues.

3 participants