"""empty message

Revision ID: 9d48ba00567c
Revises: 
Create Date: 2020-03-07 16:31:33.738983

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('author',
    sa.Column('id', sa.String(length=42), nullable=False),
    sa.Column('name', sa.String(length=255), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('paper',
    sa.Column('id', sa.String(length=42), nullable=False),
    sa.Column('title', sa.String(length=255), nullable=False),
    sa.Column('year', sa.Integer(), nullable=True),
    sa.Column('abstract', sa.Text(), nullable=False),
    sa.Column('citations', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('reference',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('from_paper', sa.String(length=42), nullable=True),
    sa.Column('to_paper', sa.String(length=42), nullable=True),
    sa.Column('isInfluential', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('write',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('paper', sa.String(length=42), nullable=True),
    sa.Column('author', sa.String(length=42), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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