state-hub/migrations/versions/f9a0b1c2d3e4_task_wait_window.py

28 lines
847 B
Python
Raw Normal View History

"""task wait window and owner-return marker (CUST-WP-0074-T02 follow-up)
Adds ``tasks.blocked_on`` (the task-block ``blocked_on: message-from:<agent>``
owner-return marker, rule 6) and ``tasks.wait_until`` (a date after which a
wait clears by itself) so that both qualifiers reach the hub read model
instead of living only in the workplan file.
Revision ID: f9a0b1c2d3e4
Revises: e8f9a0b1c2d3
"""
import sqlalchemy as sa
from alembic import op
revision = "f9a0b1c2d3e4"
down_revision = "e8f9a0b1c2d3"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column("tasks", sa.Column("blocked_on", sa.String(length=200), nullable=True))
op.add_column("tasks", sa.Column("wait_until", sa.Date(), nullable=True))
def downgrade() -> None:
op.drop_column("tasks", "wait_until")
op.drop_column("tasks", "blocked_on")