mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
added portfolio_id
This commit is contained in:
parent
d6d5accf95
commit
5d9a413aff
1 changed files with 8 additions and 1 deletions
|
|
@ -1,8 +1,15 @@
|
|||
import { pgTable, uuid, text, timestamp } from "drizzle-orm/pg-core";
|
||||
import { pgTable, uuid, text, timestamp, bigint } from "drizzle-orm/pg-core";
|
||||
import { portfolio } from "../portfolio";
|
||||
|
||||
export const tasks = pgTable("tasks", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
|
||||
// ✅ Optional bigint foreign key
|
||||
portfolioId: bigint("portfolio_id", { mode: "number" })
|
||||
.references(() => portfolio.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
|
||||
taskSource: text("task_source").notNull(),
|
||||
|
||||
jobStarted: timestamp("job_started", { precision: 6, withTimezone: true }),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue