"""addResumeAndSubmit

Revision ID: bd7dd4a9b6e6
Revises: 0d2dc3f87414
Create Date: 2020-12-19 21:49:38.679805

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'bd7dd4a9b6e6'
down_revision = '0d2dc3f87414'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('resumes',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('months_of_experience', sa.Integer(), nullable=True),
    sa.Column('cand_id', sa.Integer(), nullable=False),
    sa.Column('cand_linkedin', sa.String(length=200), nullable=True),
    sa.Column('cand_github', sa.String(length=200), nullable=True),
    sa.Column('cand_facebook', sa.String(length=200), nullable=True),
    sa.Column('cand_twitter', sa.String(length=200), nullable=True),
    sa.Column('cand_mail', sa.String(length=200), nullable=True),
    sa.Column('cand_phone', sa.String(length=15), nullable=True),
    sa.Column('soft_skills', sa.String(length=500), nullable=True),
    sa.Column('technical_skills', sa.String(length=500), nullable=True),
    sa.Column('store_url', sa.String(length=200), nullable=False),
    sa.Column('is_finding_job', sa.Boolean(), nullable=True),
    sa.ForeignKeyConstraint(['cand_id'], ['candidates.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('job_resume_submissions',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('resume_id', sa.Integer(), nullable=False),
    sa.Column('job_post_id', sa.Integer(), nullable=False),
    sa.Column('submit_date', sa.DateTime(), nullable=True),
    sa.Column('score', sa.Float(), nullable=True),
    sa.ForeignKeyConstraint(['job_post_id'], ['job_posts.id'], ),
    sa.ForeignKeyConstraint(['resume_id'], ['resumes.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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