"""empty message

Revision ID: 2e7406a3c18e
Revises: b26eb3dd335b
Create Date: 2019-04-16 18:55:07.514584

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2e7406a3c18e'
down_revision = 'b26eb3dd335b'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('seeds_tree_id_fkey', 'seeds', type_='foreignkey')
    op.drop_column('seeds', 'tree_id')
    op.drop_column('seeds', 'seed_id')
    op.add_column('trees', sa.Column('seed_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'trees', 'seeds', ['seed_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'trees', type_='foreignkey')
    op.drop_column('trees', 'seed_id')
    op.add_column('seeds', sa.Column('seed_id', sa.VARCHAR(length=250), autoincrement=False, nullable=False))
    op.add_column('seeds', sa.Column('tree_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('seeds_tree_id_fkey', 'seeds', 'trees', ['tree_id'], ['id'])
    # ### end Alembic commands ###
