"""empty message

Revision ID: 3621ae6c4339
Revises: 42e923c1238
Create Date: 2015-10-31 10:03:56.359836

"""

# revision identifiers, used by Alembic.
revision = '3621ae6c4339'
down_revision = '42e923c1238'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
import models
def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('repayment',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('price', models.MoneyField(precision=10, scale=2), nullable=False),
    sa.Column('data', sa.String(length=1000), nullable=True),
    sa.Column('order_no', sa.String(length=30), nullable=True),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.Column('update_time', sa.DateTime(), nullable=True),
    sa.Column('status', mysql.TINYINT(display_width=1), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('order_no')
    )
    ### end Alembic commands ###


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