mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
The 023 prompter migration's revision id `023_add_prompter_tracking_columns` was 33 characters — one over the `alembic_version.version_num` varchar(32) limit — so `alembic upgrade` aborted while recording it (transactional DDL rolled the whole step back) and a fresh deploy stalled at 022. Rename the revision to `023_prompter_tracking_columns` (29 chars), update the 024 migration's down_revision, and rename the file to match. No schema change; the upgrade body is untouched.
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
"""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.
|
|
|
|
Revision ID: 023_prompter_tracking_columns
|
|
Revises: 022_default_branch_master
|
|
Create Date: 2026-06-07
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
revision = "023_prompter_tracking_columns"
|
|
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")
|