manila/doc/source/devref/database.rst
Marc Koderer 829052d6dd Add tox job for db revision creation
Trivial-Fix

Change-Id: Ie87b84ddd546149ca5d9eaf2179c514071c75695
2016-07-15 05:06:25 +00:00

1.9 KiB

The Database Layer

The manila.db.api Module

manila.db.api

The Sqlalchemy Driver

The manila.db.sqlalchemy.api Module

manila.db.sqlalchemy.api

The manila.db.sqlalchemy.models Module

manila.db.sqlalchemy.models

Tests

Tests are lacking for the db api layer and for the sqlalchemy driver. Failures in the drivers would be detected in other test cases, though.

DB migration revisions

If a DB schema needs to be updated, a new DB migration file needs to be added in manila/db/migrations/alembic/versions. To create such a file it's possible to use manila-manage db revision or the corresponding tox command:

tox -e dbrevision "change_foo_table"

In addition every migration script must be tested. See examples in manila/tests/db/migrations/alembic/migrations_data_checks.py.