mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
34 lines
955 B
Python
34 lines
955 B
Python
"""remove unique on user
|
|
|
|
Revision ID: 84a5cb2a5e5b
|
|
Revises: 6a9bec0c492e
|
|
Create Date: 2023-11-22 19:47:40.609945
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '84a5cb2a5e5b'
|
|
down_revision = '6a9bec0c492e'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.drop_index('ix_user_user_name')
|
|
batch_op.create_index(batch_op.f('ix_user_user_name'), ['user_name'], 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_user_name'))
|
|
batch_op.create_index('ix_user_user_name', ['user_name'], unique=False)
|
|
|
|
# ### end Alembic commands ###
|