diff options
author | morpheus65535 <[email protected]> | 2023-11-18 20:06:08 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2023-11-18 20:06:08 -0500 |
commit | d64d6b0a018bf40309a5baa80ec852ecb02820ae (patch) | |
tree | 6ec38064bf883faef1c8f3c7bfade1184fa8bc44 /migrations | |
parent | a10e5dbf3778d9aa177f978fc85184d95b1446a0 (diff) | |
download | bazarr-d64d6b0a018bf40309a5baa80ec852ecb02820ae.tar.gz bazarr-d64d6b0a018bf40309a5baa80ec852ecb02820ae.zip |
no log: hide warning during initial database migration
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/versions/dc09994b7e65_.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migrations/versions/dc09994b7e65_.py b/migrations/versions/dc09994b7e65_.py index 6670852b1..e22eabd89 100644 --- a/migrations/versions/dc09994b7e65_.py +++ b/migrations/versions/dc09994b7e65_.py @@ -7,6 +7,8 @@ Create Date: 2023-04-12 14:50:25.281288 """ from alembic import op import sqlalchemy as sa +from sqlalchemy import exc as sa_exc +import warnings try: from psycopg2.errors import UndefinedObject @@ -46,6 +48,7 @@ def column_type(table_name, column_name): def upgrade(): # ### commands auto generated by Alembic - please adjust! ### + warnings.filterwarnings("ignore", category=sa_exc.SAWarning) # Update announcements table with op.batch_alter_table('table_announcements') as batch_op: @@ -266,6 +269,8 @@ def upgrade(): 'table_movies_rootfolder_pkey CASCADE;') batch_op.alter_column(column_name='id', existing_type=sa.INTEGER(), nullable=False, autoincrement=True) batch_op.create_primary_key(constraint_name='pk_table_movies_rootfolder', columns=['id']) + + warnings.filterwarnings("default", category=sa_exc.SAWarning) # ### end Alembic commands ### |