"""Initial

Revision ID: ec941f1f8242
Revises: <PASSWORD>
Create Date: 2021-10-10 18:34:18.294594

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


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = 'd<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('plant',
    sa.Column('id', sa.Integer(), nullable=True),
    sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_plant_id'), 'plant', ['id'], unique=False)
    op.create_index(op.f('ix_plant_name'), 'plant', ['name'], unique=False)
    op.drop_index('ix_hero_age', table_name='hero')
    op.drop_index('ix_hero_id', table_name='hero')
    op.drop_index('ix_hero_name', table_name='hero')
    op.drop_index('ix_hero_secret_name', table_name='hero')
    op.drop_table('hero')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('hero',
    sa.Column('birth_date', sa.DATETIME(), nullable=True),
    sa.Column('id', sa.INTEGER(), nullable=True),
    sa.Column('name', sa.VARCHAR(), nullable=False),
    sa.Column('secret_name', sa.VARCHAR(), nullable=False),
    sa.Column('age', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index('ix_hero_secret_name', 'hero', ['secret_name'], unique=False)
    op.create_index('ix_hero_name', 'hero', ['name'], unique=False)
    op.create_index('ix_hero_id', 'hero', ['id'], unique=False)
    op.create_index('ix_hero_age', 'hero', ['age'], unique=False)
    op.drop_index(op.f('ix_plant_name'), table_name='plant')
    op.drop_index(op.f('ix_plant_id'), table_name='plant')
    op.drop_table('plant')
    # ### end Alembic commands ###

alembic.op.drop_table sqlalchemy.INTEGER sqlalchemy.VARCHAR alembic.op.drop_index alembic.op.create_index alembic.op.f sqlmodel.sql.sqltypes.AutoString sqlalchemy.PrimaryKeyConstraint sqlalchemy.DATETIME sqlalchemy.Integer
[((726, 773), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_hero_age"""'], {'table_name': '"""hero"""'}), "('ix_hero_age', table_name='hero')\n", (739, 773), False, 'from alembic import op\n'), ((778, 824), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_hero_id"""'], {'table_name': '"""hero"""'}), "('ix_hero_id', table_name='hero')\n", (791, 824), False, 'from alembic import op\n'), ((829, 877), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_hero_name"""'], {'table_name': '"""hero"""'}), "('ix_hero_name', table_name='hero')\n", (842, 877), False, 'from alembic import op\n'), ((882, 937), 'alembic.op.drop_index', 'op.drop_index', (['"""ix_hero_secret_name"""'], {'table_name': '"""hero"""'}), "('ix_hero_secret_name', table_name='hero')\n", (895, 937), False, 'from alembic import op\n'), ((942, 963), 'alembic.op.drop_table', 'op.drop_table', (['"""hero"""'], {}), "('hero')\n", (955, 963), False, 'from alembic import op\n'), ((1429, 1506), 'alembic.op.create_index', 'op.create_index', (['"""ix_hero_secret_name"""', '"""hero"""', "['secret_name']"], {'unique': '(False)'}), "('ix_hero_secret_name', 'hero', ['secret_name'], unique=False)\n", (1444, 1506), False, 'from alembic import op\n'), ((1511, 1574), 'alembic.op.create_index', 'op.create_index', (['"""ix_hero_name"""', '"""hero"""', "['name']"], {'unique': '(False)'}), "('ix_hero_name', 'hero', ['name'], unique=False)\n", (1526, 1574), False, 'from alembic import op\n'), ((1579, 1638), 'alembic.op.create_index', 'op.create_index', (['"""ix_hero_id"""', '"""hero"""', "['id']"], {'unique': '(False)'}), "('ix_hero_id', 'hero', ['id'], unique=False)\n", (1594, 1638), False, 'from alembic import op\n'), ((1643, 1704), 'alembic.op.create_index', 'op.create_index', (['"""ix_hero_age"""', '"""hero"""', "['age']"], {'unique': '(False)'}), "('ix_hero_age', 'hero', ['age'], unique=False)\n", (1658, 1704), False, 'from alembic import op\n'), ((1829, 1851), 'alembic.op.drop_table', 'op.drop_table', (['"""plant"""'], {}), "('plant')\n", (1842, 1851), False, 'from alembic import op\n'), ((538, 567), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""id"""'], {}), "('id')\n", (561, 567), True, 'import sqlalchemy as sa\n'), ((594, 613), 'alembic.op.f', 'op.f', (['"""ix_plant_id"""'], {}), "('ix_plant_id')\n", (598, 613), False, 'from alembic import op\n'), ((666, 687), 'alembic.op.f', 'op.f', (['"""ix_plant_name"""'], {}), "('ix_plant_name')\n", (670, 687), False, 'from alembic import op\n'), ((1389, 1418), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""id"""'], {}), "('id')\n", (1412, 1418), True, 'import sqlalchemy as sa\n'), ((1723, 1744), 'alembic.op.f', 'op.f', (['"""ix_plant_name"""'], {}), "('ix_plant_name')\n", (1727, 1744), False, 'from alembic import op\n'), ((1784, 1803), 'alembic.op.f', 'op.f', (['"""ix_plant_id"""'], {}), "('ix_plant_id')\n", (1788, 1803), False, 'from alembic import op\n'), ((429, 441), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (439, 441), True, 'import sqlalchemy as sa\n'), ((481, 515), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (513, 515), False, 'import sqlmodel\n'), ((1140, 1153), 'sqlalchemy.DATETIME', 'sa.DATETIME', ([], {}), '()\n', (1151, 1153), True, 'import sqlalchemy as sa\n'), ((1191, 1203), 'sqlalchemy.INTEGER', 'sa.INTEGER', ([], {}), '()\n', (1201, 1203), True, 'import sqlalchemy as sa\n'), ((1243, 1255), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {}), '()\n', (1253, 1255), True, 'import sqlalchemy as sa\n'), ((1303, 1315), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {}), '()\n', (1313, 1315), True, 'import sqlalchemy as sa\n'), ((1355, 1367), 'sqlalchemy.INTEGER', 'sa.INTEGER', ([], {}), '()\n', (1365, 1367), True, 'import sqlalchemy as sa\n')]