feat(db): add inputs column to tasks

Mirrors sub_task.inputs (JSON as text): the task's request inputs. For a
modelling run (ADR-0008, feature/bulk-trigger-modelling) the task row itself
carries the run's config — portfolio id, scenario ids, filters — with
sub_tasks holding the per-property execution work. Column-only change so it
can be applied to the database ahead of the feature merging.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-07 10:31:11 +00:00
parent 27254e7622
commit fe521aa8d5
4 changed files with 11807 additions and 0 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "tasks" ADD COLUMN "inputs" text;

File diff suppressed because it is too large Load diff

View file

@ -1828,6 +1828,13 @@
"when": 1783352788862,
"tag": "0261_fixed_excalibur",
"breakpoints": true
},
{
"idx": 262,
"version": "7",
"when": 1783420235209,
"tag": "0262_wandering_nocturne",
"breakpoints": true
}
]
}

View file

@ -18,6 +18,11 @@ export const tasks = pgTable("tasks", {
sourceId: text("source_id"), // identifier for the source (e.g., portfolio_id value)
// The task's request inputs, mirroring sub_task.inputs (JSON as text; could
// later change to JSONB). For a modelling run this is the run's config —
// portfolio id, scenario ids, filters (ADR-0008).
inputs: text("inputs"),
updatedAt: timestamp("updated_at", { precision: 6, withTimezone: true })
.defaultNow()
.$onUpdate(() => new Date())