feat(db): add fabric_first flag to scenario

Adds `fabric_first boolean NOT NULL DEFAULT false` to the scenario table
via the drizzle model, with the generated migration (0268).

Migration to be run via `npm run migration:migrate` once merged to main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-09 11:32:58 +00:00
parent 9fa11b0b6d
commit 9e57596b64
4 changed files with 12218 additions and 0 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "scenario" ADD COLUMN "fabric_first" boolean DEFAULT false NOT NULL;

File diff suppressed because it is too large Load diff

View file

@ -1870,6 +1870,13 @@
"when": 1783521828294,
"tag": "0267_add_hubspot_deal_planning_columns",
"breakpoints": true
},
{
"idx": 268,
"version": "7",
"when": 1783596612599,
"tag": "0268_free_magneto",
"breakpoints": true
}
]
}

View file

@ -318,6 +318,7 @@ export const scenario = pgTable("scenario", {
exclusions: text("exclusions"),
multiPlan: boolean("multi_plan"),
isDefault: boolean("is_default").notNull(),
fabricFirst: boolean("fabric_first").notNull().default(false),
// Aggregations that were previously being stored against the portfolio, that are now being stored against the scenario
cost: real("cost"),
contingency: real("contingency"),