"""add borrowusermodel

Revision ID: 964a7090b563
Revises: 7bb3a33c9e63
Create Date: 2018-09-04 16:05:07.106765

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

# revision identifiers, used by Alembic.
revision = '964a7090b563'
down_revision = '7bb3a33c9e63'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('borrow_users',
    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_mobile', mysql.CHAR(length=12), server_default='', nullable=False),
    sa.Column('status', mysql.TINYINT(display_width=1), server_default='1', nullable=False),
    sa.Column('password', sa.String(length=128), server_default='', nullable=False),
    sa.Column('passwd_salt', sa.String(length=128), server_default='', nullable=False),
    sa.Column('bcrypt_salt', sa.String(length=128), server_default='', nullable=False),
    sa.Column('option1', sa.String(length=128), server_default='', nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('user_id'),
    sa.UniqueConstraint('user_mobile')
    )
    # ### end Alembic commands ###


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