summaryrefslogtreecommitdiff
path: root/oslo_db
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2020-10-30 10:12:13 +0000
committerStephen Finucane <stephenfin@redhat.com>2020-10-30 10:40:24 +0000
commitfc855875236fd3bf760237fc64092f4a9d864fcb (patch)
treed7361d447cfb51e0b3f04ae5e6515ceb555b4b32 /oslo_db
parentf62ddb15244d5b5aa0c54f2d6b0ae30799835eb2 (diff)
downloadoslo-db-fc855875236fd3bf760237fc64092f4a9d864fcb.tar.gz
Deprecate 'oslo_db.sqlalchemy.migration' module
This module hasn't been touched with years and 'sqlalchemy-migrate' is effectively abandoned. It's time to drop support for this an encourage the laggards to switch to alembic and use it directly. Change-Id: I59335b4f318bae2e29ab139cdea089a4d6e14305 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'oslo_db')
-rw-r--r--oslo_db/sqlalchemy/migration.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/oslo_db/sqlalchemy/migration.py b/oslo_db/sqlalchemy/migration.py
index 31a6105..b29b4da 100644
--- a/oslo_db/sqlalchemy/migration.py
+++ b/oslo_db/sqlalchemy/migration.py
@@ -41,6 +41,7 @@
import os
+from debtcollector import removals
from migrate import exceptions as versioning_exceptions
from migrate.versioning import api as versioning_api
from migrate.versioning.repository import Repository
@@ -50,6 +51,13 @@ from oslo_db._i18n import _
from oslo_db import exception
+_removed_msg = (
+ 'sqlalchemy-migrate support in oslo_db is deprecated; consider '
+ 'migrating to alembic'
+)
+
+
+@removals.remove(message=_removed_msg, version='8.3.0')
def db_sync(engine, abs_path, version=None, init_version=0, sanity_check=True):
"""Upgrade or downgrade a database.
@@ -116,6 +124,7 @@ def _db_schema_sanity_check(engine):
) % ','.join(table_names))
+@removals.remove(message=_removed_msg, version='8.3.0')
def db_version(engine, abs_path, init_version):
"""Show the current version of the repository.
@@ -141,6 +150,7 @@ def db_version(engine, abs_path, init_version):
"manually."))
+@removals.remove(message=_removed_msg, version='8.3.0')
def db_version_control(engine, abs_path, version=None):
"""Mark a database as under this repository's version control.