"""Doctor & Patients table

Revision ID: cbe32a1e2540
Revises: 
Create Date: 2020-08-24 19:11:23.284040

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('doctor',
    sa.Column('id', sa.String(length=120), nullable=False),
    sa.Column('full_name', sa.String(length=64), nullable=True),
    sa.Column('city', sa.String(length=20), nullable=True),
    sa.Column('qual', sa.String(length=20), nullable=True),
    sa.Column('fees', sa.Integer(), nullable=True),
    sa.Column('phone', sa.Integer(), nullable=True),
    sa.Column('address', sa.String(length=120), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('password_hash', sa.String(length=120), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_doctor_email'), 'doctor', ['email'], unique=True)
    op.create_index(op.f('ix_doctor_full_name'), 'doctor', ['full_name'], unique=False)
    op.create_table('patient',
    sa.Column('id', sa.String(length=120), nullable=False),
    sa.Column('full_name', sa.String(length=64), nullable=True),
    sa.Column('city', sa.String(length=20), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('password_hash', sa.String(length=120), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_patient_email'), 'patient', ['email'], unique=True)
    op.create_index(op.f('ix_patient_full_name'), 'patient', ['full_name'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_patient_full_name'), table_name='patient')
    op.drop_index(op.f('ix_patient_email'), table_name='patient')
    op.drop_table('patient')
    op.drop_index(op.f('ix_doctor_full_name'), table_name='doctor')
    op.drop_index(op.f('ix_doctor_email'), table_name='doctor')
    op.drop_table('doctor')
    # ### end Alembic commands ###
