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

📚 DOCS: finalize rename of verdi database migrate #5246

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/opt/configure-aiida.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ verdi profile show || echo "The default profile is not set."
verdi daemon stop

# Migration will run for the default profile.
verdi database migrate --force || echo "Database migration failed."
verdi storage migrate --force || echo "Database migration failed."

# Daemon will start only if the database exists and is migrated to the latest version.
verdi daemon start || echo "AiiDA daemon is not running."
4 changes: 2 additions & 2 deletions aiida/backends/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
Database schema generation `{schema_generation_database}` is incompatible with the required schema generation `{schema_generation_code}`.
To migrate the database schema generation to the current one, run the following command:

verdi -p {profile_name} database migrate
verdi -p {profile_name} storage migrate
"""

TEMPLATE_INVALID_SCHEMA_VERSION = """
Database schema version `{schema_version_database}` is incompatible with the required schema version `{schema_version_code}`.
To migrate the database schema version to the current one, run the following command:

verdi -p {profile_name} database migrate
verdi -p {profile_name} storage migrate
"""

TEMPLATE_MIGRATE_SCHEMA_VERSION_INVALID_VERSION = """
Expand Down
4 changes: 2 additions & 2 deletions aiida/cmdline/commands/cmd_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def database_migrate(ctx, force):

.. deprecated:: v2.0.0
"""
from aiida.cmdline.commands.cmd_storage import backend_migrate
ctx.forward(backend_migrate)
from aiida.cmdline.commands.cmd_storage import storage_migrate
ctx.forward(storage_migrate)


@verdi_database.group('integrity')
Expand Down
2 changes: 1 addition & 1 deletion aiida/cmdline/commands/cmd_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def verdi_status(print_traceback, no_rmq):

except IncompatibleDatabaseSchema:
message = f'Database schema {dbgen} / {dbver} (generation/version) is incompatible with the code. '
message += 'Run `verdi database migrate` to solve this.'
message += 'Run `verdi storage migrate` to solve this.'
print_status(ServiceStatus.DOWN, 'postgres', message)
exit_code = ExitCode.CRITICAL

Expand Down
2 changes: 1 addition & 1 deletion docs/source/howto/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ Failing to do so, may leave your installation in a broken state, or worse may ev
* If you have installed AiiDA through ``pip`` simply run: ``pip install --upgrade aiida-core``.
* If you have installed from the git repository using ``pip install -e .``, first delete all the ``.pyc`` files (``find . -name "*.pyc" -delete``) before updating your branch with ``git pull``.

6. Migrate your database with ``verdi -p <profile_name> database migrate``.
6. Migrate your database with ``verdi -p <profile_name> storage migrate``.
Depending on the size of your database and the number of migrations to perform, data migration can take time, so please be patient.

After the database migration finishes, you will be able to continue working with your existing data.
Expand Down
2 changes: 1 addition & 1 deletion tests/cmdline/commands/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_backend():
result = run_cli_command(cmd_status.verdi_status, raises=True)
assert 'Database schema' in result.output
assert 'is incompatible with the code.' in result.output
assert '`verdi database migrate`' in result.output
assert '`verdi storage migrate`' in result.output
assert result.exit_code is ExitCode.CRITICAL


Expand Down