diff options
author | morpheus65535 <[email protected]> | 2024-12-16 20:36:36 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-12-16 20:36:36 -0500 |
commit | d502cac41fec300d532a23e818140e1ae7e6f91c (patch) | |
tree | 98172b4626c0c8a0b99712e55d4e1a9c2ec6c41b | |
parent | 1172a87e8aa9e008cf5bb1d6a00572e6fc95d372 (diff) | |
download | bazarr-d502cac41fec300d532a23e818140e1ae7e6f91c.tar.gz bazarr-d502cac41fec300d532a23e818140e1ae7e6f91c.zip |
Fixed revision instead of importing common function. We'll rework that later.
-rw-r--r-- | migrations/utils.py | 10 | ||||
-rw-r--r-- | migrations/versions/4274a5dfc4ad_.py | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/migrations/utils.py b/migrations/utils.py deleted file mode 100644 index 069f36d0c..000000000 --- a/migrations/utils.py +++ /dev/null @@ -1,10 +0,0 @@ -from alembic import op -import sqlalchemy as sa - -bind = op.get_context().bind -insp = sa.inspect(bind) - - -def column_exists(table_name, column_name): - columns = insp.get_columns(table_name) - return any(c["name"] == column_name for c in columns) diff --git a/migrations/versions/4274a5dfc4ad_.py b/migrations/versions/4274a5dfc4ad_.py index 6787936fa..a417e5f0a 100644 --- a/migrations/versions/4274a5dfc4ad_.py +++ b/migrations/versions/4274a5dfc4ad_.py @@ -8,8 +8,6 @@ Create Date: 2024-12-15 21:19:19.406290 from alembic import op import sqlalchemy as sa -from migrations.utils import column_exists - # revision identifiers, used by Alembic. revision = '4274a5dfc4ad' @@ -17,6 +15,14 @@ down_revision = '8baf97427327' branch_labels = None depends_on = None +bind = op.get_context().bind +insp = sa.inspect(bind) + + +def column_exists(table_name, column_name): + columns = insp.get_columns(table_name) + return any(c["name"] == column_name for c in columns) + def upgrade(): if not column_exists('table_shows', 'ended'): |