1234567891011121314151617181920212223242526 |
- """user_add_discord_id
- Revision ID: 39d94b1c082b
- Revises: c1d7ddb101a1
- Create Date: 2019-04-25 07:07:10.028304
- """
- from alembic import op
- import sqlalchemy as sa
- # revision identifiers, used by Alembic.
- revision = '39d94b1c082b'
- down_revision = 'c1d7ddb101a1'
- branch_labels = None
- depends_on = None
- def upgrade():
- op.add_column('user', sa.Column('discord_id', sa.BigInteger(), nullable=True))
- op.create_unique_constraint(op.f('uq_user_discord_id'), 'user', ['discord_id'])
- def downgrade():
- op.drop_constraint(op.f('uq_user_discord_id'), 'user', type_='unique')
- op.drop_column('user', 'discord_id')
|