"""create tables

Revision ID: 02809806f723
Revises: 
Create Date: 2019-10-05 00:17:07.343363

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "02809806f723"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "whatis",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("whatis_id", sa.String(), nullable=False),
        sa.Column("terminology", sa.String(), nullable=False),
        sa.Column("definition", sa.String(), nullable=False),
        sa.Column("notes", sa.String(), nullable=True),
        sa.Column("links", sa.String(), nullable=True),
        sa.Column("submitted_at", sa.DateTime(), nullable=False),
        sa.Column("version", sa.Integer(), nullable=False),
        sa.Column("added_by", sa.String(), nullable=False),
        sa.Column("point_of_contact", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "whatis_preloader",
        sa.Column("hash", sa.String(), nullable=False),
        sa.Column("filename", sa.String(), nullable=False),
        sa.Column("loaded_at", sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint("hash"),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("whatis_preloader")
    op.drop_table("whatis")
    # ### end Alembic commands ###
