clean imports (delete imports, which are not used)

This commit is contained in:
2023-08-12 23:46:09 +03:00
parent a5798cf767
commit 1880f8abec
7 changed files with 86 additions and 25 deletions

View File

@ -0,0 +1,48 @@
"""in trashbox model categories->category
Revision ID: 547f860f21a7
Revises: a0206e2bf259
Create Date: 2023-08-12 16:13:44.598427
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '547f860f21a7'
down_revision = 'a0206e2bf259'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('poems', schema=None) as batch_op:
batch_op.add_column(sa.Column('title', sa.String(), nullable=True))
batch_op.add_column(sa.Column('text', sa.String(), nullable=True))
batch_op.add_column(sa.Column('author', sa.String(), nullable=True))
batch_op.drop_column('poem_name')
batch_op.drop_column('poem_text')
with op.batch_alter_table('trashboxes', schema=None) as batch_op:
batch_op.add_column(sa.Column('category', sa.String(), nullable=True))
batch_op.drop_column('categories')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('trashboxes', schema=None) as batch_op:
batch_op.add_column(sa.Column('categories', sa.VARCHAR(), nullable=True))
batch_op.drop_column('category')
with op.batch_alter_table('poems', schema=None) as batch_op:
batch_op.add_column(sa.Column('poem_text', sa.VARCHAR(), nullable=True))
batch_op.add_column(sa.Column('poem_name', sa.VARCHAR(), nullable=True))
batch_op.drop_column('author')
batch_op.drop_column('text')
batch_op.drop_column('title')
# ### end Alembic commands ###