"""empty message

Revision ID: b5df1a6243da
Revises: 0fb189c709f3
Create Date: 2019-02-16 22:13:04.450973

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b5df1a6243da'
down_revision = '0fb189c709f3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('baseconfigs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('baseconfigid', sa.String(length=10), nullable=True),
    sa.Column('baseconfigname', sa.String(length=10), nullable=False),
    sa.Column('baseconfigcontent', sa.UnicodeText(), nullable=False),
    sa.Column('lastupdate', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_baseconfigs_baseconfigid'), 'baseconfigs', ['baseconfigid'], unique=True)
    op.create_table('dbfsyncs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('dbfsyncid', sa.String(length=10), nullable=True),
    sa.Column('dbfsynccontent', sa.UnicodeText(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('operationlogs',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('filename', sa.String(length=15), nullable=False),
    sa.Column('actiontype', sa.String(length=10), nullable=False),
    sa.Column('user', sa.String(length=30), nullable=False),
    sa.Column('actiontime', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_operationlogs_actiontype'), 'operationlogs', ['actiontype'], unique=False)
    op.create_index(op.f('ix_operationlogs_filename'), 'operationlogs', ['filename'], unique=False)
    op.create_index(op.f('ix_operationlogs_user'), 'operationlogs', ['user'], unique=False)
    op.drop_table('dbfsync')
    op.drop_index('ix_base_config_baseconfigid', table_name='base_config')
    op.drop_table('base_config')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('base_config',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('baseconfigid', sa.VARCHAR(length=10), nullable=True),
    sa.Column('baseconfigname', sa.VARCHAR(length=10), nullable=False),
    sa.Column('baseconfigcontent', sa.TEXT(), nullable=False),
    sa.Column('lastupdate', sa.DATETIME(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index('ix_base_config_baseconfigid', 'base_config', ['baseconfigid'], unique=1)
    op.create_table('dbfsync',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('dbfsyncid', sa.VARCHAR(length=10), nullable=True),
    sa.Column('dbfsynccontent', sa.TEXT(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_index(op.f('ix_operationlogs_user'), table_name='operationlogs')
    op.drop_index(op.f('ix_operationlogs_filename'), table_name='operationlogs')
    op.drop_index(op.f('ix_operationlogs_actiontype'), table_name='operationlogs')
    op.drop_table('operationlogs')
    op.drop_table('dbfsyncs')
    op.drop_index(op.f('ix_baseconfigs_baseconfigid'), table_name='baseconfigs')
    op.drop_table('baseconfigs')
    # ### end Alembic commands ###
