Index workplan flavor and omit residuals from default views.
STATE-WP-0092: persist flavor from files, treat depends_on as the C-20 canonical edge, exclude flavor=residual from summary/next_steps/deps unless include_residuals is set. Live primary still needs the alembic revision applied. Assistant: grok Assistant-Session: 01a09dc1-b21e-77e1-919e-fcad2f82b267
This commit is contained in:
parent
ea11451e9c
commit
ddc3338541
18 changed files with 852 additions and 25 deletions
39
migrations/versions/c6f7a8b9d0e1_work_record_flavor.py
Normal file
39
migrations/versions/c6f7a8b9d0e1_work_record_flavor.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
"""work-record flavor on workplans and tasks (STATE-WP-0092)
|
||||
|
||||
Flavor is a closed bucket (planning, implementation, refactoring, extension,
|
||||
residual), orthogonal to kind and status. Nullable: unset is not residual.
|
||||
|
||||
Revision ID: c6f7a8b9d0e1
|
||||
Revises: b5e6f7a8c9d0
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "c6f7a8b9d0e1"
|
||||
down_revision = "b5e6f7a8c9d0"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("workplans", sa.Column("flavor", sa.String(length=32), nullable=True))
|
||||
op.add_column(
|
||||
"workplans",
|
||||
sa.Column("flavor_promotion_reason", sa.String(length=32), nullable=True),
|
||||
)
|
||||
op.add_column(
|
||||
"workplans",
|
||||
sa.Column("flavor_promoted_from", sa.String(length=32), nullable=True),
|
||||
)
|
||||
op.create_index("ix_workplans_flavor", "workplans", ["flavor"])
|
||||
op.add_column("tasks", sa.Column("flavor", sa.String(length=32), nullable=True))
|
||||
op.create_index("ix_tasks_flavor", "tasks", ["flavor"])
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_index("ix_tasks_flavor", table_name="tasks")
|
||||
op.drop_column("tasks", "flavor")
|
||||
op.drop_index("ix_workplans_flavor", table_name="workplans")
|
||||
op.drop_column("workplans", "flavor_promoted_from")
|
||||
op.drop_column("workplans", "flavor_promotion_reason")
|
||||
op.drop_column("workplans", "flavor")
|
||||
Loading…
Add table
Add a link
Reference in a new issue