Set a custom alembic_version for refstack

This is the update to the patch by mtreinish that allows for the
setting of a custom alembic version_table name. In this patch,
the name of this table is set via a new flag in conf. This is the
first patch of several that will allow us to build in the ability
to collect and upload subunit data to the refstack server. By
default, the table is set to be named "alembic_version".

Previously, this patch also included some alembic configuration.
This has been removed due to the fact that renaming the
alembic_version table is not as simple as previously hoped, and
will, as a result, require the usage of a migration script.
Because of this, I have chosen to sever the two patches, largely,
due to the fact that they have separate functionalities, although
the migration patch will consume the conf setting created in this
patch, so this merging this patch first would be highly advisable.
Change-Id: I4c82aabb727694d7cd55aaab339bbc55b1835f27
This commit is contained in:
Matthew Treinish 2017-07-25 15:38:04 -04:00 committed by Megan Guiney
parent 88e42fe9a3
commit 84be8b1766
2 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,11 @@
# The backend to use for database. (string value)
#db_backend = sqlalchemy
# The alembic version table name to use within the
# database. To allow RefStack to upload and store
# the full set of subunit data. set this option to
# refstack_alembic_version.
#version_table = alembic_table
[api]

View File

@ -27,6 +27,12 @@ db_opts = [
cfg.StrOpt('db_backend',
default='sqlalchemy',
help='The backend to use for database.'),
cfg.StrOpt('version_table',
default='alembic_version',
help='The alembic version table name to use within the ' +
'database. To allow RefStack to upload and store ' +
'the full set of subunit data, set this option to ' +
'refstack_alembic_version.'),
]
CONF = cfg.CONF