Skip to content
Snippets Groups Projects
c5109b93fc0f_add_claim_names.py 1005 B
Newer Older
kaiyou's avatar
kaiyou committed
""" Add additional claim names

Revision ID: c5109b93fc0f
Revises: 24626feb96c7
Create Date: 2020-03-30 17:28:26.222118
"""

from alembic import op
import sqlalchemy as sa
import hiboo


revision = 'c5109b93fc0f'
down_revision = '24626feb96c7'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('claimname',
    sa.Column('profile_uuid', sa.String(length=36), nullable=True),
    sa.Column('service_uuid', sa.String(length=36), nullable=True),
    sa.Column('username', sa.String(length=255), nullable=False),
    sa.Column('uuid', sa.String(length=36), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('comment', sa.String(length=255), nullable=True),
    sa.ForeignKeyConstraint(['profile_uuid'], ['profile.uuid'], ),
    sa.ForeignKeyConstraint(['service_uuid'], ['service.uuid'], ),
    sa.PrimaryKeyConstraint('uuid')
    )


def downgrade():
    op.drop_table('claimname')