"""Initial migration

Revision ID: 455f2c315335
Revises: 
Create Date: 2019-05-08 19:40:09.134801

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "455f2c315335"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "match",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("title", sa.String(), nullable=True),
        sa.Column("created", sa.DateTime(), nullable=True),
        sa.Column("goal_dollars", sa.Integer(), nullable=True),
        sa.Column("total_dollars", sa.Integer(), nullable=True),
        sa.Column("total_cents", sa.Integer(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "donation",
        sa.Column("id", sa.String(), nullable=False),
        sa.Column("amount", sa.String(), nullable=True),
        sa.Column("currency", sa.String(), nullable=True),
        sa.Column("date", sa.DateTime(), nullable=True),
        sa.Column("status", sa.String(), nullable=True),
        sa.Column("name", sa.String(), nullable=True),
        sa.Column("match_id", sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(["match_id"], ["match.id"]),
        sa.PrimaryKeyConstraint("id"),
    )
    # ### end Alembic commands ###


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