"""empty message

Revision ID: ccfd21f69af6
Revises: 
Create Date: 2019-06-01 15:54:56.593072

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('UserData',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('line_userid', sa.String(length=40), nullable=True),
    sa.Column('is_admin', sa.Boolean(), nullable=True),
    sa.Column('school_userid', sa.String(length=32), nullable=True),
    sa.Column('school_password', sa.String(length=32), nullable=True),
    sa.Column('line_bot_state', sa.String(length=32), nullable=True),
    sa.Column('data_temp', sa.String(length=256), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('line_userid')
    )
    op.create_table('Record',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=16), nullable=True),
    sa.Column('expect_time', sa.DateTime(), nullable=True),
    sa.Column('start_time', sa.DateTime(), nullable=True),
    sa.Column('end_time', sa.DateTime(), nullable=True),
    sa.Column('remind_date', sa.DateTime(), nullable=True),
    sa.Column('importance', sa.Boolean(), nullable=True),
    sa.Column('content', sa.String(length=256), nullable=True),
    sa.Column('repeat', sa.Boolean(), nullable=True),
    sa.Column('allday_event', sa.Boolean(), nullable=True),
    sa.Column('daily_remind', sa.String(length=8), nullable=True),
    sa.Column('sup_data', sa.Boolean(), nullable=True),
    sa.Column('finished', sa.Boolean(), nullable=True),
    sa.Column('state', sa.String(length=16), nullable=True),
    sa.Column('user_dbid', sa.Integer(), nullable=False),
    sa.Column('user_lineid', sa.String(length=40), nullable=True),
    sa.ForeignKeyConstraint(['user_dbid'], ['UserData.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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