Files
TextSouls/backend/migrations/versions/02142c549a8c_.py

45 lines
1.3 KiB
Python

"""empty message
Revision ID: 02142c549a8c
Revises: 07950b032eb7
Create Date: 2022-11-19 00:29:12.011840
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '02142c549a8c'
down_revision = '07950b032eb7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('character_classes', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['name'])
with op.batch_alter_table('character_races', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['name'])
with op.batch_alter_table('characters', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['name'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('characters', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')
with op.batch_alter_table('character_races', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')
with op.batch_alter_table('character_classes', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')
# ### end Alembic commands ###