"""add taxon ranks fields

Revision ID: 8b21130270e5
Revises: 6938832cbce2
Create Date: 2021-02-28 20:27:51.569273

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8b21130270e5'
down_revision = '6938832cbce2'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('taxa', sa.Column('comments', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('genus_modifier', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('genus_name', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('non_taxa_descriptor', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('species_modifier', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('species_name', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('subgenera_modifier', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('subgenera_name', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('subspecies_modifier', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('subspecies_name', sa.String(), nullable=True))
    op.add_column('taxa', sa.Column('taxon_name_above_genus', sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('taxa', 'taxon_name_above_genus')
    op.drop_column('taxa', 'subspecies_name')
    op.drop_column('taxa', 'subspecies_modifier')
    op.drop_column('taxa', 'subgenera_name')
    op.drop_column('taxa', 'subgenera_modifier')
    op.drop_column('taxa', 'species_name')
    op.drop_column('taxa', 'species_modifier')
    op.drop_column('taxa', 'non_taxa_descriptor')
    op.drop_column('taxa', 'genus_name')
    op.drop_column('taxa', 'genus_modifier')
    op.drop_column('taxa', 'comments')
    # ### end Alembic commands ###
