mirror of
https://github.com/himanshudongre/smriti.git
synced 2026-08-28 05:14:59 +00:00
Add Alembic migration for work_claims.task_id column
Single nullable VARCHAR(100) column addition. Applied and verified against the real local Postgres: claims with task_id round-trip correctly, claims without task_id work unchanged.
This commit is contained in:
parent
beae3b5c9b
commit
3358515593
1 changed files with 30 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
"""Add task_id column to work_claims.
|
||||
|
||||
Allows claims to reference a specific structured task by its id field,
|
||||
enabling precise collision detection when multiple agents start
|
||||
near-simultaneously.
|
||||
|
||||
Revision ID: a8b9cadbef01
|
||||
Revises: f7a8b9cadbef
|
||||
Create Date: 2026-04-14 20:00:00.000000
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a8b9cadbef01"
|
||||
down_revision = "f7a8b9cadbef"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"work_claims",
|
||||
sa.Column("task_id", sa.String(100), nullable=True),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("work_claims", "task_id")
|
||||
Loading…
Add table
Reference in a new issue