monasca-api/monasca_api/db
Johannes Grassler 39d5bbbb0a Alembic migrations for all SQL script revisions
This commit adds

* An alembic environment for running database migrations
* Alembic database migrations for all revisions
  of the legacy SQL script currently being used to set up the
  Monasca database.
* The get_all_metadata() function for exposing full data model
  metadata. This function is needed generating migrations from
  the current state of the model and should be kept up to date
  as the model is being extended.

Change-Id: I41b4577d8334791f712177348cadfe9b07b62ef1
Story: 2001654
Task: 14339
2018-06-22 08:16:35 +00:00
..
alembic Alembic migrations for all SQL script revisions 2018-06-22 08:16:35 +00:00
README Alembic migrations for all SQL script revisions 2018-06-22 08:16:35 +00:00
__init__.py Alembic migrations for all SQL script revisions 2018-06-22 08:16:35 +00:00
alembic.ini Alembic migrations for all SQL script revisions 2018-06-22 08:16:35 +00:00

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.