"""forms_editable_after_submit

Revision: 0183
Revision ID: 3b4dea6ade9d
Revises: 47ecf6e8811b
Create Date: 2020-04-21 09:30:04.775134

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql


# revision identifiers, used by Alembic.
revision = '3b4dea6ade9d'
down_revision = '47ecf6e8811b'
branch_labels = None
depends_on = None


def upgrade():
    op.add_column('request_forms', sa.Column('editable_after_submit', sa.Boolean(), nullable=True))
    op.execute("UPDATE request_forms SET editable_after_submit = false")


def downgrade():
    op.drop_column('request_forms', 'editable_after_submit')
