app/migrations/versions/2021_030618_94f14eb0fe5b_.py

32 lines
819 B
Python
Raw Normal View History

2021-03-07 01:06:29 +08:00
"""empty message
2021-03-07 01:08:38 +08:00
Revision ID: 94f14eb0fe5b
Revises: d1236c4dff71
Create Date: 2021-03-06 18:10:10.450794
2021-03-07 01:06:29 +08:00
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
2021-03-07 01:08:38 +08:00
revision = '94f14eb0fe5b'
down_revision = 'd1236c4dff71'
2021-03-07 01:06:29 +08:00
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('alias', sa.Column('transfer_token', sa.String(length=64), nullable=True))
op.create_unique_constraint(None, 'alias', ['transfer_token'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'alias', type_='unique')
op.drop_column('alias', 'transfer_token')
# ### end Alembic commands ###