2026-06-07 22:16:56 +02:00
|
|
|
"""Add prompter origin tracking columns to tasks table.
|
|
|
|
|
|
|
|
|
|
Adds `source` (varchar 50, default 'manual') and `confirmed_by_human`
|
|
|
|
|
(boolean, default false) to support the Prompter conversational assistant
|
|
|
|
|
feature. Prompter-originated tasks require human confirmation before entering
|
|
|
|
|
the workflow.
|
|
|
|
|
|
2026-06-08 15:06:15 +02:00
|
|
|
Revision ID: 023_prompter_tracking_columns
|
2026-06-07 22:16:56 +02:00
|
|
|
Revises: 022_default_branch_master
|
|
|
|
|
Create Date: 2026-06-07
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
from alembic import op
|
|
|
|
|
|
2026-06-08 15:06:15 +02:00
|
|
|
revision = "023_prompter_tracking_columns"
|
2026-06-07 22:16:56 +02:00
|
|
|
down_revision = "022_default_branch_master"
|
|
|
|
|
branch_labels = None
|
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade() -> None:
|
|
|
|
|
op.add_column(
|
|
|
|
|
"tasks",
|
|
|
|
|
sa.Column("source", sa.String(length=50), server_default="manual", nullable=False),
|
|
|
|
|
)
|
|
|
|
|
op.add_column(
|
|
|
|
|
"tasks",
|
|
|
|
|
sa.Column("confirmed_by_human", sa.Boolean(), server_default=sa.false(), nullable=False),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade() -> None:
|
|
|
|
|
op.drop_column("tasks", "confirmed_by_human")
|
|
|
|
|
op.drop_column("tasks", "source")
|