PaperParser/migrations/versions/11ed77b4dbe8_phone_and_user...

35 lines
966 B
Python
Raw Permalink Normal View History

2024-03-09 23:13:04 +10:00
"""phone and username not unique
Revision ID: 11ed77b4dbe8
Revises: d573f6529ad5
Create Date: 2024-03-09 22:59:14.088171
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '11ed77b4dbe8'
down_revision = 'd573f6529ad5'
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_constraint('user_phone_key', type_='unique')
batch_op.drop_constraint('user_username_key', type_='unique')
# ### 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.create_unique_constraint('user_username_key', ['username'])
batch_op.create_unique_constraint('user_phone_key', ['phone'])
# ### end Alembic commands ###