0250f81cdc
This commit adds a schema management tool for the Monasca configuration database. Apart from the usual OpenStack schema management tool subcommands (stamp, upgrade, version) it has two extra subcommands: * fingerprint: for computing a SHA1 fingerprint of the currently currently active database schema. * detect-revision: for identifiying the Alembic revision (if any) corresponding to a database schema that was created with one of the legacy SQL scripts. The data provided by the detect-revision subcommand can be used for stamping the database with Alembic version metadata when transitioning an existing Monasca configuration database to Alembic based database migrations. Story: 2001654 Task: 14341 Change-Id: Ibdd877a23ab5d6d1bbf8d83515c0197554098526 |
||
---|---|---|
.. | ||
alembic | ||
__init__.py | ||
alembic.ini | ||
fingerprint.py | ||
README |
This directory contains the plumbing for the Alembic migrations that modify the Monasca database. If you need to add a new migration, run alembic revision -m '<revision message>' in this directory, where <revision message> is a short description for what your migration does such as 'Add volume field to alarm'. Alembic will then create a revision script in the alembic/versions/ directory. You will need to edit this script to add upwards and downwards migrations for the change you want to make.