"""empty message

Revision ID: 1291cb958a84
Revises: 
Create Date: 2020-01-03 12:49:34.052701

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

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('borrower',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('first_name', sa.String(length=50), nullable=True),
    sa.Column('last_name', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=50), nullable=True),
    sa.Column('phone', sa.String(length=50), nullable=True),
    sa.Column('mobile', sa.String(length=50), nullable=True),
    sa.Column('email', sa.String(length=50), nullable=True),
    sa.Column('date_joined', sa.DateTime(), nullable=True),
    sa.Column('interest_rate', sa.Float(), nullable=True),
    sa.Column('penalty_rate', sa.Float(), nullable=True),
    sa.Column('balance', sa.Float(), nullable=True),
    sa.PrimaryKeyConstraint('uuid')
    )
    op.create_table('company',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('company_name', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=100), nullable=True),
    sa.Column('phone', sa.String(length=50), nullable=True),
    sa.Column('mobile', sa.String(length=50), nullable=True),
    sa.Column('total_fund', sa.Float(), nullable=True),
    sa.Column('available_fund', sa.Float(), nullable=True),
    sa.Column('lended_fund', sa.Float(), nullable=True),
    sa.Column('total_profit', sa.Float(), nullable=True),
    sa.Column('interest_rate', sa.Float(), nullable=True),
    sa.PrimaryKeyConstraint('uuid')
    )
    op.create_table('member',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('first_name', sa.String(length=50), nullable=True),
    sa.Column('last_name', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=50), nullable=True),
    sa.Column('phone', sa.String(length=50), nullable=True),
    sa.Column('mobile', sa.String(length=50), nullable=True),
    sa.Column('email', sa.String(length=50), nullable=True),
    sa.Column('date_joined', sa.Date(), nullable=True),
    sa.Column('monthly_contribution', sa.Float(), nullable=True),
    sa.PrimaryKeyConstraint('uuid')
    )
    op.create_table('user',
    sa.Column('uuid', postgresql.UUID(as_uuid=True), nullable=False),
    sa.Column('username', sa.String(length=20), nullable=True),
    sa.Column('password', sa.String(length=200), nullable=True),
    sa.Column('display_name', sa.String(length=30), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('uuid'),
    sa.UniqueConstraint('username')
    )
    # ### end Alembic commands ###


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