"""Add participant and application

Revision ID: 58d2280520b8
Revises:
Create Date: 2022-02-12 07:30:30.427270+00:00

"""
import sqlalchemy as sa
import sqlmodel
from alembic import op

# revision identifiers, used by Alembic.
revision = "58d2280520b8"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "participants",
        sa.Column("first_name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("last_name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("email", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("id", sa.Integer(), nullable=False),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "applications",
        sa.Column(
            "gender",
            sa.Enum("MALE", "FEMALE", "NON_BINARY", name="gender"),
            nullable=True,
        ),
        sa.Column(
            "race_ethnicity",
            sa.Enum(
                "AMERICAN_INDIAN",
                "ASIAN",
                "PACIFIC_ISLANDER",
                "BLACK",
                "HISPANIC",
                "CAUCASIAN",
                "MULTIPLE_OTHER",
                name="raceethnicity",
            ),
            nullable=True,
        ),
        sa.Column("participant_id", sa.Integer(), nullable=False),
        sa.Column("level_of_study", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("graduation_year", sa.Integer(), nullable=False),
        sa.Column("major", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.Column("date_of_birth", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("hackathons_attended", sa.Integer(), nullable=False),
        sa.Column("portfolio_url", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.Column("vcs_url", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.Column(
            "shipping_address", sqlmodel.sql.sqltypes.AutoString(), nullable=True
        ),
        sa.Column("share_information", sa.Boolean(), nullable=False),
        sa.ForeignKeyConstraint(
            ["participant_id"],
            ["participants.id"],
        ),
        sa.PrimaryKeyConstraint("participant_id"),
    )
    # ### end Alembic commands ###


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

sqlalchemy.ForeignKeyConstraint alembic.op.drop_table sqlalchemy.Boolean sqlalchemy.PrimaryKeyConstraint sqlalchemy.Integer sqlmodel.sql.sqltypes.AutoString sqlalchemy.Enum
[((2458, 2487), 'alembic.op.drop_table', 'op.drop_table', (['"""applications"""'], {}), "('applications')\n", (2471, 2487), False, 'from alembic import op\n'), ((2492, 2521), 'alembic.op.drop_table', 'op.drop_table', (['"""participants"""'], {}), "('participants')\n", (2505, 2521), False, 'from alembic import op\n'), ((753, 782), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""id"""'], {}), "('id')\n", (776, 782), True, 'import sqlalchemy as sa\n'), ((2176, 2240), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['participant_id']", "['participants.id']"], {}), "(['participant_id'], ['participants.id'])\n", (2199, 2240), True, 'import sqlalchemy as sa\n'), ((2285, 2326), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""participant_id"""'], {}), "('participant_id')\n", (2308, 2326), True, 'import sqlalchemy as sa\n'), ((473, 507), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (505, 507), False, 'import sqlmodel\n'), ((557, 591), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (589, 591), False, 'import sqlmodel\n'), ((637, 671), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (669, 671), False, 'import sqlmodel\n'), ((714, 726), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (724, 726), True, 'import sqlalchemy as sa\n'), ((888, 942), 'sqlalchemy.Enum', 'sa.Enum', (['"""MALE"""', '"""FEMALE"""', '"""NON_BINARY"""'], {'name': '"""gender"""'}), "('MALE', 'FEMALE', 'NON_BINARY', name='gender')\n", (895, 942), True, 'import sqlalchemy as sa\n'), ((1043, 1176), 'sqlalchemy.Enum', 'sa.Enum', (['"""AMERICAN_INDIAN"""', '"""ASIAN"""', '"""PACIFIC_ISLANDER"""', '"""BLACK"""', '"""HISPANIC"""', '"""CAUCASIAN"""', '"""MULTIPLE_OTHER"""'], {'name': '"""raceethnicity"""'}), "('AMERICAN_INDIAN', 'ASIAN', 'PACIFIC_ISLANDER', 'BLACK', 'HISPANIC',\n    'CAUCASIAN', 'MULTIPLE_OTHER', name='raceethnicity')\n", (1050, 1176), True, 'import sqlalchemy as sa\n'), ((1391, 1403), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (1401, 1403), True, 'import sqlalchemy as sa\n'), ((1458, 1492), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (1490, 1492), False, 'import sqlmodel\n'), ((1548, 1560), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (1558, 1560), True, 'import sqlalchemy as sa\n'), ((1606, 1640), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (1638, 1640), False, 'import sqlmodel\n'), ((1693, 1727), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (1725, 1727), False, 'import sqlmodel\n'), ((1787, 1799), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (1797, 1799), True, 'import sqlalchemy as sa\n'), ((1853, 1887), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (1885, 1887), False, 'import sqlmodel\n'), ((1934, 1968), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (1966, 1968), False, 'import sqlmodel\n'), ((2037, 2071), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (2069, 2071), False, 'import sqlmodel\n'), ((2137, 2149), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (2147, 2149), True, 'import sqlalchemy as sa\n')]