summaryrefslogtreecommitdiffstats
path: root/migrations/versions/ef39fcd6e1cd_add_sso_account_id_in_table_users.py
blob: 9e125165ae95e864c5ebf46b18157ac2172f54bc (plain)
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
"""Add SSO account ID in table Users

Revision ID: ef39fcd6e1cd
Revises: f47cad5d6d03
Create Date: 2020-06-08 10:04:13.898617

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ef39fcd6e1cd'
down_revision = 'f47cad5d6d03'
branch_labels = None
depends_on = None


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


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