mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
Merge branch 'main' into feature/categorisation-trigger
This commit is contained in:
commit
a133833928
4 changed files with 5707 additions and 1 deletions
3
src/app/db/migrations/0154_workable_stingray.sql
Normal file
3
src/app/db/migrations/0154_workable_stingray.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
CREATE TYPE "public"."source" AS ENUM('portfolio_id');--> statement-breakpoint
|
||||
ALTER TABLE "tasks" ADD COLUMN "source" "source";--> statement-breakpoint
|
||||
ALTER TABLE "tasks" ADD COLUMN "source_id" text;
|
||||
5690
src/app/db/migrations/meta/0154_snapshot.json
Normal file
5690
src/app/db/migrations/meta/0154_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1079,6 +1079,13 @@
|
|||
"when": 1771757665072,
|
||||
"tag": "0153_large_machine_man",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 154,
|
||||
"version": "7",
|
||||
"when": 1772194536121,
|
||||
"tag": "0154_workable_stingray",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
import { pgTable, uuid, text, timestamp } from "drizzle-orm/pg-core";
|
||||
import { pgTable, uuid, text, timestamp, pgEnum } from "drizzle-orm/pg-core";
|
||||
|
||||
export const sourceEnum = pgEnum("source", ["portfolio_id"]);
|
||||
|
||||
export const tasks = pgTable("tasks", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
|
|
@ -12,6 +14,10 @@ export const tasks = pgTable("tasks", {
|
|||
|
||||
service: text("service"), // e.g. plan, wchg etc
|
||||
|
||||
source: sourceEnum("source"), // enum for task source type
|
||||
|
||||
sourceId: text("source_id"), // identifier for the source (e.g., portfolio_id value)
|
||||
|
||||
updatedAt: timestamp("updated_at", { precision: 6, withTimezone: true })
|
||||
.defaultNow()
|
||||
.$onUpdate(() => new Date())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue