drydock/alembic/versions/4713e7ebca9_add_task_status_links.py
Scott Hussey cff7420cff Support links for task status
- Some status changes in a task may have additional information that
  is referenced by a URI link. Support describing these links and
  returning them via API.
- Refactor alembic stuff to better handle table schema updates
- Add unit tests

Change-Id: Iae63a9716f2522578be0244925fc274a4338eac4
2018-07-27 20:16:24 -05:00

30 lines
599 B
Python

"""add task status links
Revision ID: 4713e7ebca9
Revises: 4a5bef3702b
Create Date: 2018-07-05 14:54:18.381988
"""
# revision identifiers, used by Alembic.
revision = '4713e7ebca9'
down_revision = '4a5bef3702b'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from drydock_provisioner.statemgmt.db import tables
def upgrade():
for c in tables.Tasks.__add_result_links__:
op.add_column(tables.Tasks.__tablename__, c)
def downgrade():
for c in tables.Tasks.__add_result_links__:
op.drop_column(tables.Tasks.__tablename__, c.name)