summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-07-16 13:19:41 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-07-29 16:37:02 +0100
commitda002a82f113afc1eb9f0329d567ae9db573091b (patch)
treefe55e0c65ade77f12f5499847a959033027ae6aa
parent40bce5a2baf75dc87dd591e0f71a00f221a2ba92 (diff)
downloadoslo-db-da002a82f113afc1eb9f0329d567ae9db573091b.tar.gz
utils: Deprecate sqlalchemy-migrate-related functions
These are using private APIs of SQLAlchemy but, more importantly, are not necessary in an alembic-only world. Mark them deprecated for removal. Change-Id: I6efb6e1d35542cd8df922c86e134fe1e0b8c2e52 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
-rw-r--r--oslo_db/sqlalchemy/utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/oslo_db/sqlalchemy/utils.py b/oslo_db/sqlalchemy/utils.py
index 95613d4..2329b4b 100644
--- a/oslo_db/sqlalchemy/utils.py
+++ b/oslo_db/sqlalchemy/utils.py
@@ -25,6 +25,7 @@ import re
from alembic.migration import MigrationContext
from alembic.operations import Operations
+import debtcollector.removals
from oslo_utils import timeutils
import sqlalchemy
from sqlalchemy import Boolean
@@ -544,6 +545,12 @@ def _restore_indexes_on_deleted_columns(engine, table_name, indexes):
new_index.create(engine)
+@debtcollector.removals.remove(
+ message='This API is intended for use with sqlalchemy-migrate, support '
+ 'for which is deprecated for removal; it will be removed in a future '
+ 'release',
+ version='10.1.0',
+)
def change_deleted_column_type_to_boolean(engine, table_name,
**col_name_col_instance):
if engine.name == "sqlite":
@@ -617,6 +624,12 @@ def _change_deleted_column_type_to_boolean_sqlite(engine, table_name,
execute()
+@debtcollector.removals.remove(
+ message='This API is intended for use with sqlalchemy-migrate, support '
+ 'for which is deprecated for removal; it will be removed in a future '
+ 'release',
+ version='10.1.0',
+)
def change_deleted_column_type_to_id_type(engine, table_name,
**col_name_col_instance):
if engine.name == "sqlite":