"""empty message

Revision ID: f4c99095e70c
Revises: 0c451fc35b86
Create Date: 2017-03-29 10:27:16.400605

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'f4c99095e70c'
down_revision = '0c451fc35b86'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('wechat_push_msg',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('wechat_msg_id', sa.String(length=100), nullable=True),
    sa.Column('wechat_user_info_id', sa.Integer(), nullable=True),
    sa.Column('push_type', sa.String(length=20), nullable=False),
    sa.Column('push_info', sa.JSON(), nullable=True),
    sa.Column('push_time', sa.DateTime(), nullable=True),
    sa.Column('push_flag', sa.Boolean(), nullable=True),
    sa.Column('push_remark', sa.String(length=200), nullable=True),
    sa.Column('push_times', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['wechat_user_info_id'], ['wechat_user_info.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.alter_column('web_access_log', 'user_agent',
               existing_type=sa.VARCHAR(length=200),
               type_=sa.String(length=500),
               existing_nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('web_access_log', 'user_agent',
               existing_type=sa.String(length=500),
               type_=sa.VARCHAR(length=200),
               existing_nullable=True)
    op.drop_table('wechat_push_msg')
    # ### end Alembic commands ###
