"""more indexes Revision ID: a8fc7f7ba539 Revises: 62cbf0bf515a Create Date: 2024-02-13 17:16:47.046338 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a8fc7f7ba539' down_revision = '62cbf0bf515a' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table('community_member', schema=None) as batch_op: batch_op.create_index(batch_op.f('ix_community_member_is_banned'), ['is_banned'], unique=False) with op.batch_alter_table('post', schema=None) as batch_op: batch_op.create_index(batch_op.f('ix_post_from_bot'), ['from_bot'], unique=False) batch_op.create_index(batch_op.f('ix_post_nsfl'), ['nsfl'], unique=False) batch_op.create_index(batch_op.f('ix_post_nsfw'), ['nsfw'], unique=False) batch_op.create_index(batch_op.f('ix_post_ranking'), ['ranking'], unique=False) with op.batch_alter_table('user', schema=None) as batch_op: batch_op.create_index(batch_op.f('ix_user_avatar_id'), ['avatar_id'], unique=False) batch_op.create_index(batch_op.f('ix_user_cover_id'), ['cover_id'], unique=False) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table('user', schema=None) as batch_op: batch_op.drop_index(batch_op.f('ix_user_cover_id')) batch_op.drop_index(batch_op.f('ix_user_avatar_id')) with op.batch_alter_table('post', schema=None) as batch_op: batch_op.drop_index(batch_op.f('ix_post_ranking')) batch_op.drop_index(batch_op.f('ix_post_nsfw')) batch_op.drop_index(batch_op.f('ix_post_nsfl')) batch_op.drop_index(batch_op.f('ix_post_from_bot')) with op.batch_alter_table('community_member', schema=None) as batch_op: batch_op.drop_index(batch_op.f('ix_community_member_is_banned')) # ### end Alembic commands ###