<reponame>debrief/pepys-import<gh_stars>1-10
"""Make name nullable for activation and geometry

Revision ID: fd0f7e61611c
Revises: <KEY>
Create Date: 2020-06-29 09:51:21.571264

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "fd0f7e61611c"
down_revision = "<KEY>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("Activations", schema=None) as batch_op:
        batch_op.alter_column("name", existing_type=sa.VARCHAR(length=150), nullable=True)

    with op.batch_alter_table("Geometries", schema=None) as batch_op:
        batch_op.alter_column("name", existing_type=sa.VARCHAR(length=150), nullable=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("Geometries", schema=None) as batch_op:
        batch_op.alter_column("name", existing_type=sa.VARCHAR(length=150), nullable=False)

    with op.batch_alter_table("Activations", schema=None) as batch_op:
        batch_op.alter_column("name", existing_type=sa.VARCHAR(length=150), nullable=False)

    # ### end Alembic commands ###
