"""init db

Revision ID: f6ca1e97d6d5
Revises: 
Create Date: 2018-12-12 14:31:08.782356

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('account_change_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_change_record_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('account_token_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('token_id', sa.String(length=255), server_default='', nullable=False),
    sa.Column('change_type', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.Column('change_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('change_fee', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('change_number', sa.INTEGER(), server_default='1', nullable=False),
    sa.Column('balance', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('frozon_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('investment_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('token_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('begin_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('finish_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('transaction_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('source', sa.String(length=64), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_change_record_id')
    )
    op.create_table('account_login_message',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('source', mysql.TINYINT(display_width=4), server_default='1', nullable=False),
    sa.Column('login_ip', sa.String(length=128), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('account_recharge_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_recharge_record_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('account_change_record_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('token_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('receive_token', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('transaction_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('token_id', sa.String(length=255), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='1', nullable=False),
    sa.Column('begin_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('finish_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('balance', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('frozon_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('investment_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_recharge', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('source', sa.String(length=64), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_recharge_record_id')
    )
    op.create_table('account_withdraw_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_withdraw_record_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('account_change_record_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('token_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('withdraw_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('transaction_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('token_id', sa.String(length=255), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='1', nullable=False),
    sa.Column('begin_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('finish_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('balance', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('frozon_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('investment_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_recharge', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_withdraw_record_id')
    )
    op.create_table('announcement_manage',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('title', sa.String(length=255), server_default='', nullable=False),
    sa.Column('site', sa.String(length=255), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('auto_online', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('auto_offline', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('remark', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('banner_manage',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('title', sa.String(length=255), server_default='', nullable=False),
    sa.Column('site', sa.String(length=255), server_default='', nullable=False),
    sa.Column('image', sa.String(length=255), server_default='', nullable=True),
    sa.Column('thumbnail', sa.String(length=255), server_default='', nullable=True),
    sa.Column('status', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('auto_online', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('auto_offline', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('remark', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('block_chain_info',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('instance_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('record_type', mysql.TINYINT(display_width=1), server_default=sa.text('0'), nullable=False),
    sa.Column('info_hash', sa.String(length=256), server_default='', nullable=False),
    sa.Column('transaction_hash', sa.String(length=256), server_default='', nullable=False),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('participate_id', sa.BigInteger(), server_default=sa.text('-1'), nullable=False),
    sa.Column('on_chain_status', mysql.TINYINT(display_width=1), server_default=sa.text('0'), nullable=False),
    sa.Column('on_chain_at', sa.DateTime(), nullable=False),
    sa.Column('on_chain_info', mysql.LONGTEXT(), nullable=True),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('foreign_assign_address_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('req_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=True),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('req_no')
    )
    op.create_table('foreign_gather_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('record_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('conditions', sa.String(length=255), server_default='', nullable=False),
    sa.Column('purpose_amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('actual_amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('actual_fee', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gather_status', sa.String(length=8), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('record_id')
    )
    op.create_table('foreign_multi_withdraw_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('record_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('from_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gas', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('verified_amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('verified_gas', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('process_record', sa.TEXT(), nullable=True),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('record_id')
    )
    op.create_table('foreign_withdraw_order_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('order_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('relate_flow_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('req_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('from_address', sa.String(length=255), server_default='', nullable=True),
    sa.Column('withdraw_address', sa.String(length=255), server_default='', nullable=True),
    sa.Column('withdraw_amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_actual_amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_actual_fee', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_consume_total_fee', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_gas_price', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('withdraw_type', sa.String(length=8), server_default='', nullable=False),
    sa.Column('withdraw_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('audit_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('source_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('do_withdraw_result', sa.String(length=255), server_default='', nullable=False),
    sa.Column('expect_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('process_record', sa.TEXT(), nullable=True),
    sa.Column('transfer_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('audit_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('remark', sa.TEXT(), nullable=True),
    sa.Column('audit_user', sa.String(length=255), server_default='', nullable=False),
    sa.Column('operation_user', sa.String(length=255), server_default='', nullable=False),
    sa.Column('confirm_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('order_no')
    )
    op.create_table('game_digital_instance',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('template_id', sa.BigInteger(), nullable=True),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('game_title', sa.String(length=255), server_default='', nullable=False),
    sa.Column('bet_token', mysql.TINYINT(), server_default='2', nullable=False),
    sa.Column('bet_unit', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('participation', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('need', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('status', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('reward_token', mysql.TINYINT(), server_default='1', nullable=False),
    sa.Column('reward_quantity', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('release_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('full_load_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('lottery_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('release_type', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('handling_fee', sa.Numeric(precision=21, scale=2), server_default='0.00', nullable=False),
    sa.Column('game_describe', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('game_serial')
    )
    op.create_table('game_digital_template',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('game_title', sa.String(length=128), server_default='', nullable=False),
    sa.Column('reward_token', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_token', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_unit', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('reward_quantity', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('need_ceiling', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('need_floor', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('exceeded_ratio', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('handling_fee', sa.Numeric(precision=21, scale=2), server_default='0', nullable=False),
    sa.Column('support_token', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('template_status', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('auto_release', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('game_describe', sa.String(length=128), server_default='', nullable=False),
    sa.Column('phase_prefix', sa.String(length=128), server_default='', nullable=False),
    sa.Column('phase_date', sa.String(length=128), server_default='', nullable=False),
    sa.Column('phase_serial', sa.String(length=128), server_default='', nullable=False),
    sa.Column('agreement_name', sa.String(length=128), server_default='', nullable=False),
    sa.Column('agreement', sa.String(length=128), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('game_get_lottery_block_info',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.Column('time_stamp', sa.BigInteger(), nullable=False),
    sa.Column('block_hash', sa.String(length=64), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('mine_comments',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('submit_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('submit_content', sa.String(length=255), server_default='', nullable=False),
    sa.Column('submit_image', sa.String(length=255), server_default='', nullable=True),
    sa.Column('submit_thumbnail', sa.String(length=255), server_default='', nullable=True),
    sa.Column('praise_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('praise_users', mysql.TEXT(), nullable=True),
    sa.Column('status', mysql.TINYINT(), server_default='1', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('participate_in',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.Column('template_id', sa.BigInteger(), server_default='0', nullable=False),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('game_title', sa.String(length=255), server_default='', nullable=False),
    sa.Column('bet_token', mysql.INTEGER(), server_default='2', nullable=False),
    sa.Column('release_type', mysql.TINYINT(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('nick_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('channel', sa.String(length=64), server_default='', nullable=False),
    sa.Column('pay_token', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_unit', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('pay_number', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('award_numbers', mysql.MEDIUMTEXT(), nullable=True),
    sa.Column('user_type', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('chain_status', mysql.INTEGER(), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('robot_account',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('score', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('id_card', sa.String(length=64), server_default='', nullable=False),
    sa.Column('nick_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('source', mysql.TINYINT(display_width=4), server_default='0', nullable=False),
    sa.Column('avatar', sa.String(length=128), server_default='', nullable=False),
    sa.Column('user_mobile', mysql.CHAR(length=64), server_default='', nullable=False),
    sa.Column('email', sa.String(length=128), server_default='', nullable=False),
    sa.Column('mobile_country_code', sa.String(length=128), server_default='', nullable=False),
    sa.Column('user_name', mysql.CHAR(length=64), nullable=True),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_id')
    )
    op.create_table('robot_config_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('nick_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('bet_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('pay_token', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('pay_number', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('bet_plan_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('bet_status', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('time_stamp', sa.BigInteger(), nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_id')
    )
    op.create_table('robot_game_config_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('robot_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('total_bet_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('start_of_plan_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('end_of_plan_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('end_of_real_time', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('status', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('robot_bet_type', mysql.INTEGER(), server_default='1', nullable=False),
    sa.Column('created_user_id', sa.String(length=64), nullable=False),
    sa.Column('time_stamp', sa.BigInteger(), nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('sync_block',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('block_no', sa.INTEGER(), nullable=False),
    sa.Column('block_hash', sa.String(length=255), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=4), nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('coin_id')
    )
    op.create_table('token_coin',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('coin_name', sa.String(length=128), server_default='', nullable=False),
    sa.Column('coin_des', sa.String(length=128), server_default='', nullable=False),
    sa.Column('status', sa.String(length=8), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('coin_id')
    )
    op.create_table('token_conf',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('confirm_last_block_num', sa.String(length=8), server_default='', nullable=False),
    sa.Column('confirm_last_err_days', sa.String(length=8), server_default='', nullable=False),
    sa.Column('withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gas_lag', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gas_routine', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gas_prior', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('gas_limit', sa.Integer(), server_default='1', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('coin_id')
    )
    op.create_table('token_salt',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('public_key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('nonce_aes', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('public_key_aes')
    )
    op.create_table('token_type',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('token_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('token_eng_name', sa.String(length=255), server_default='', nullable=False),
    sa.Column('legal_tender', sa.String(length=64), server_default='', nullable=False),
    sa.Column('usdt_tender', mysql.INTEGER(), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('token_name')
    )
    op.create_table('tx_list_btc',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('tx_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('tx_no', sa.String(length=255), server_default='', nullable=False),
    sa.Column('vout', sa.INTEGER(), nullable=False),
    sa.Column('block_no', sa.INTEGER(), nullable=False),
    sa.Column('value', sa.Numeric(precision=21, scale=18), nullable=False),
    sa.Column('address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('cost_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.Column('source_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('do_recharge_result', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    op.create_table('tx_list_eth',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('tx_id', sa.String(length=32), server_default='', nullable=False),
    sa.Column('tx_no', sa.String(length=255), server_default='', nullable=False),
    sa.Column('vout', sa.INTEGER(), server_default='0', nullable=False),
    sa.Column('block_no', sa.INTEGER(), nullable=False),
    sa.Column('value', sa.Numeric(precision=21, scale=18), nullable=False),
    sa.Column('address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('cost_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.Column('source_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('do_recharge_result', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('tx_no')
    )
    op.create_table('tx_listening_btc',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('order_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('record_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('block_no', sa.INTEGER(), nullable=False),
    sa.Column('tx_no', sa.String(length=255), server_default='', nullable=False),
    sa.Column('tx_nos', mysql.TEXT(), nullable=True),
    sa.Column('withdraw_type', sa.String(length=8), server_default='', nullable=False),
    sa.Column('source_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('listen_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.Column('multi_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('order_no'),
    sa.UniqueConstraint('tx_no')
    )
    op.create_table('tx_listening_eth',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('order_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('record_no', sa.String(length=32), server_default='', nullable=False),
    sa.Column('block_no', sa.INTEGER(), nullable=False),
    sa.Column('tx_no', sa.String(length=255), server_default='', nullable=False),
    sa.Column('tx_nos', mysql.TEXT(), nullable=True),
    sa.Column('withdraw_type', sa.String(length=8), server_default='', nullable=False),
    sa.Column('listen_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.Column('source_status', sa.String(length=8), server_default='0', nullable=False),
    sa.Column('multi_flag', mysql.TINYINT(display_width=4), nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('order_no'),
    sa.UniqueConstraint('tx_no')
    )
    op.create_table('user_account',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('score', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('id_card', sa.String(length=64), server_default='', nullable=False),
    sa.Column('nick_name', sa.String(length=64), server_default='', nullable=False),
    sa.Column('source', mysql.TINYINT(display_width=4), server_default='1', nullable=False),
    sa.Column('avatar', sa.String(length=128), server_default='', nullable=False),
    sa.Column('transaction_password', sa.String(length=128), server_default='', nullable=False),
    sa.Column('transaction_passwd_salt', sa.String(length=128), server_default='', nullable=False),
    sa.Column('transaction_bcrypt_salt', sa.String(length=128), server_default='', nullable=False),
    sa.Column('first_recharge_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('user_mobile', mysql.CHAR(length=64), server_default='', nullable=False),
    sa.Column('email', sa.String(length=128), server_default='', nullable=False),
    sa.Column('mobile_country_code', sa.String(length=128), server_default='', nullable=False),
    sa.Column('user_name', mysql.CHAR(length=64), nullable=True),
    sa.Column('register_ip', sa.String(length=128), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='1', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_id')
    )
    op.create_table('user_account_token',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('account_token_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('token_id', sa.String(length=255), server_default='', nullable=False),
    sa.Column('total_recharge', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('total_withdraw_fee', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('balance', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('frozon_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('investment_amount', sa.Numeric(precision=21, scale=18), server_default='0.0000', nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='1', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('account_token_id')
    )
    op.create_table('wallet_btc',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('sub_index', sa.BigInteger(), nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('change_index', sa.String(length=255), server_default='', nullable=False),
    sa.Column('acct_public_key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.Column('amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_frozen', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('sub_public_address')
    )
    op.create_table('wallet_btc_gather',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('sub_index', sa.BigInteger(), nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('change_index', sa.String(length=255), server_default='', nullable=False),
    sa.Column('acct_public_key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.Column('amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_frozen', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('desc', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('sub_public_address')
    )
    op.create_table('wallet_eth',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('sub_index', sa.BigInteger(), nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('change_index', sa.String(length=255), server_default='', nullable=False),
    sa.Column('acct_public_key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.Column('amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_frozen', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('sub_public_address')
    )
    op.create_table('wallet_eth_gather',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('sub_index', sa.BigInteger(), nullable=False),
    sa.Column('sub_public_address', sa.String(length=255), server_default='', nullable=False),
    sa.Column('change_index', sa.String(length=255), server_default='', nullable=False),
    sa.Column('acct_public_key_aes', sa.String(length=255), server_default='', nullable=False),
    sa.Column('coin_id', sa.String(length=128), server_default='', nullable=False),
    sa.Column('account_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='0', nullable=False),
    sa.Column('amount', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_change', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('amount_frozen', sa.Numeric(precision=21, scale=18), server_default='0.000000000000000000', nullable=False),
    sa.Column('desc', sa.String(length=255), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('_id'),
    sa.UniqueConstraint('sub_public_address')
    )
    op.create_table('winning_record',
    sa.Column('_id', sa.BigInteger(), autoincrement=True, nullable=False),
    sa.Column('created_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('update_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted_at', sa.DateTime(), server_default='0000-00-00 00:00:00', nullable=False),
    sa.Column('deleted', sa.Boolean(), server_default='0', nullable=False),
    sa.Column('game_instance_id', sa.BigInteger(), nullable=False),
    sa.Column('game_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('bet_serial', sa.String(length=64), server_default='', nullable=False),
    sa.Column('bet_hash', sa.String(length=255), server_default='', nullable=False),
    sa.Column('reward_token', mysql.TINYINT(), server_default='1', nullable=False),
    sa.Column('reward_quantity', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('user_id', sa.String(length=64), server_default='', nullable=False),
    sa.Column('bet_token', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('bet_number', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('user_type', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('block_no', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('timestamp', sa.String(length=128), server_default='', nullable=False),
    sa.Column('received_time', sa.String(length=128), server_default='', nullable=False),
    sa.Column('block_type', sa.String(length=128), server_default='', nullable=False),
    sa.Column('participation', mysql.INTEGER(), server_default='0', nullable=False),
    sa.Column('chain_status', mysql.INTEGER(), server_default='0', nullable=False),
    sa.PrimaryKeyConstraint('_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('winning_record')
    op.drop_table('wallet_eth_gather')
    op.drop_table('wallet_eth')
    op.drop_table('wallet_btc_gather')
    op.drop_table('wallet_btc')
    op.drop_table('user_account_token')
    op.drop_table('user_account')
    op.drop_table('tx_listening_eth')
    op.drop_table('tx_listening_btc')
    op.drop_table('tx_list_eth')
    op.drop_table('tx_list_btc')
    op.drop_table('token_type')
    op.drop_table('token_salt')
    op.drop_table('token_conf')
    op.drop_table('token_coin')
    op.drop_table('sync_block')
    op.drop_table('robot_game_config_record')
    op.drop_table('robot_config_record')
    op.drop_table('robot_account')
    op.drop_table('participate_in')
    op.drop_table('mine_comments')
    op.drop_table('game_get_lottery_block_info')
    op.drop_table('game_digital_template')
    op.drop_table('game_digital_instance')
    op.drop_table('foreign_withdraw_order_record')
    op.drop_table('foreign_multi_withdraw_record')
    op.drop_table('foreign_gather_record')
    op.drop_table('foreign_assign_address_record')
    op.drop_table('block_chain_info')
    op.drop_table('banner_manage')
    op.drop_table('announcement_manage')
    op.drop_table('account_withdraw_record')
    op.drop_table('account_recharge_record')
    op.drop_table('account_login_message')
    op.drop_table('account_change_record')
    # ### end Alembic commands ###
