"""empty message Revision ID: bb3518c7dc22 Revises: 0df253550689 Create Date: 2023-04-23 19:42:48.812186 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'bb3518c7dc22' down_revision = '0df253550689' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table('feedbacks', schema=None) as batch_op: batch_op.add_column(sa.Column('user_id', sa.Integer(), nullable=True)) batch_op.drop_index('name') batch_op.create_foreign_key(None, 'users', ['user_id'], ['id']) batch_op.drop_column('name') # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table('feedbacks', schema=None) as batch_op: batch_op.add_column(sa.Column('name', mysql.VARCHAR(length=64), nullable=True)) batch_op.drop_constraint(None, type_='foreignkey') batch_op.create_index('name', ['name'], unique=False) batch_op.drop_column('user_id') # ### end Alembic commands ###