Add status to task order table

This commit is contained in:
Patrick Smith
2019-01-10 14:02:08 -05:00
parent 27eb15fc2d
commit dda6db8562
3 changed files with 45 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
"""Add status enum to task_order
Revision ID: 3d346b5c8f19
Revises: 71cbe76c3b87
Create Date: 2019-01-10 13:55:58.934890
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3d346b5c8f19'
down_revision = '71cbe76c3b87'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('task_orders', sa.Column('status', sa.Enum('PENDING', name='status', native_enum=False), nullable=True))
# ### end Alembic commands ###
conn = op.get_bind()
conn.execute("UPDATE task_orders set status = 'PENDING'")
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('task_orders', 'status')
# ### end Alembic commands ###