"""add registrars table

Revision ID: e75613684054
Revises: f3af7f84d4b3
Create Date: 2020-08-06 15:50:17.618587+00:00

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e75613684054'
down_revision = 'f3af7f84d4b3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('registrars',
    sa.Column('id', sa.BigInteger(), nullable=False),
    sa.Column('pdd_id', sa.BigInteger(), nullable=True),
    sa.Column('pdd_version', sa.String(), nullable=True),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('admin_id', sa.BigInteger(), nullable=False),
    sa.Column('password', sa.String(), nullable=False),
    sa.Column('oauth_client_id', sa.String(), nullable=True),
    sa.Column('validate_domain_url', sa.String(), nullable=True),
    sa.Column('domain_added_callback_url', sa.String(), nullable=True),
    sa.Column('domain_verified_callback_url', sa.String(), nullable=True),
    sa.Column('domain_deleted_callback_url', sa.String(), nullable=True),
    sa.Column('token', sa.String(), nullable=True),
    sa.Column('iv', sa.String(), nullable=True),
    sa.Column('plength', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('registrars')
    # ### end Alembic commands ###
