"""empty message

Revision ID: 8eeee3130b6c
Revises: 
Create Date: 2020-05-12 06:47:15.649563

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8eeee3130b6c'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('IsAdmin',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('is_admin', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('TwitterInfos',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('twitter_id', sa.String(length=80), nullable=False),
    sa.Column('consumer_key', sa.String(length=80), nullable=False),
    sa.Column('consumer_secret_key', sa.String(length=80), nullable=False),
    sa.Column('access_token', sa.String(length=80), nullable=False),
    sa.Column('secret_access_token', sa.String(length=80), nullable=False),
    sa.Column('max_send_message', sa.Integer(), nullable=True),
    sa.Column('direct_messages1', sa.String(length=144), nullable=True),
    sa.Column('direct_messages2', sa.String(length=144), nullable=True),
    sa.Column('direct_messages3', sa.String(length=144), nullable=True),
    sa.Column('like_keyword', sa.String(length=144), nullable=True),
    sa.Column('like_interval', sa.Integer(), nullable=True),
    sa.Column('max_like', sa.Integer(), nullable=True),
    sa.Column('follow_keyword', sa.String(length=144), nullable=True),
    sa.Column('follow_interval', sa.Integer(), nullable=True),
    sa.Column('max_follow', sa.Integer(), nullable=True),
    sa.Column('is_status', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('access_token'),
    sa.UniqueConstraint('consumer_key'),
    sa.UniqueConstraint('consumer_secret_key'),
    sa.UniqueConstraint('secret_access_token'),
    sa.UniqueConstraint('twitter_id')
    )
    op.create_table('userque',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=80), nullable=False),
    sa.Column('email', sa.String(length=80), nullable=False),
    sa.Column('password', sa.String(length=30), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('first_name', sa.String(length=30), nullable=True),
    sa.Column('last_name', sa.String(length=30), nullable=True),
    sa.Column('active', sa.Boolean(), nullable=True),
    sa.Column('is_admin', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=80), nullable=False),
    sa.Column('email', sa.String(length=80), nullable=False),
    sa.Column('password', sa.LargeBinary(length=128), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('first_name', sa.String(length=30), nullable=True),
    sa.Column('last_name', sa.String(length=30), nullable=True),
    sa.Column('active', sa.Boolean(), nullable=True),
    sa.Column('is_admin', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('roles',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=80), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('roles')
    op.drop_table('users')
    op.drop_table('userque')
    op.drop_table('TwitterInfos')
    op.drop_table('IsAdmin')
    # ### end Alembic commands ###
