"""empty message

Revision ID: f826c9bf9577
Revises: <PASSWORD>
Create Date: 2018-11-19 11:30:33.703663

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('credentials',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('site_id', sa.Integer(), nullable=False),
    sa.Column('account_id', sa.VARCHAR(length=256), nullable=False),
    sa.Column('account_secret', sa.VARCHAR(length=256), nullable=False),
    sa.Column('description', sa.Text(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('updated_at', sa.DateTime(), nullable=False),
    sa.CheckConstraint('char_length(account_id)>=32', name='account_id_min_length'),
    sa.CheckConstraint('char_length(account_secret)>=32', name='account_secret_min_length'),
    sa.ForeignKeyConstraint(['site_id'], ['site.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('account_id'),
    sa.UniqueConstraint('account_secret')
    )
    op.create_index(op.f('ix_credentials_site_id'), 'credentials', ['site_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_credentials_site_id'), table_name='credentials')
    op.drop_table('credentials')
    # ### end Alembic commands ###

"""empty message

Revision ID: f826c9bf9577
Revises: <PASSWORD>
Create Date: 2018-11-19 11:30:33.703663

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('credentials',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('site_id', sa.Integer(), nullable=False),
    sa.Column('account_id', sa.VARCHAR(length=256), nullable=False),
    sa.Column('account_secret', sa.VARCHAR(length=256), nullable=False),
    sa.Column('description', sa.Text(), nullable=False),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('updated_at', sa.DateTime(), nullable=False),
    sa.CheckConstraint('char_length(account_id)>=32', name='account_id_min_length'),
    sa.CheckConstraint('char_length(account_secret)>=32', name='account_secret_min_length'),
    sa.ForeignKeyConstraint(['site_id'], ['site.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('account_id'),
    sa.UniqueConstraint('account_secret')
    )
    op.create_index(op.f('ix_credentials_site_id'), 'credentials', ['site_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_credentials_site_id'), table_name='credentials')
    op.drop_table('credentials')
    # ### end Alembic commands ###

empty message  Revision ID: f826c9bf9577 Revises: <PASSWORD> Create Date: 2018-11-19 11:30:33.703663 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###