Blame view

migrations/versions/20f2c14aa0b6_.py 744 Bytes
18ae7b15   hitier   Add user.login field
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""empty message

Revision ID: 20f2c14aa0b6
Revises: 
Create Date: 2021-03-08 15:14:27.758721

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '20f2c14aa0b6'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('login', sa.String(length=1000), nullable=True))
    op.create_unique_constraint(None, 'user', ['login'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'user', type_='unique')
    op.drop_column('user', 'login')
    # ### end Alembic commands ###