mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
add uploaded_file_id fk to magic_plan_plan
This commit is contained in:
parent
6f9fabb622
commit
00b0cc2a45
1 changed files with 10 additions and 6 deletions
|
|
@ -1,12 +1,16 @@
|
|||
import { pgTable, bigserial, text } from "drizzle-orm/pg-core";
|
||||
import { pgTable, bigserial, text, bigint } from "drizzle-orm/pg-core";
|
||||
import { uploadedFiles } from "../uploaded_files";
|
||||
|
||||
export const magicPlanPlan = pgTable(
|
||||
"magic_plan_plan",
|
||||
{
|
||||
id: bigserial("id", { mode: "bigint" }).primaryKey(),
|
||||
name: text("name"),
|
||||
address: text("address"),
|
||||
postcode: text("postcode"),
|
||||
magicPlanUid: text("magic_plan_uid").unique(),
|
||||
id: bigserial("id", { mode: "bigint" }).primaryKey(),
|
||||
name: text("name"),
|
||||
address: text("address"),
|
||||
postcode: text("postcode"),
|
||||
magicPlanUid: text("magic_plan_uid").unique(),
|
||||
uploadedFileId: bigint("uploaded_file_id", { mode: "bigint" })
|
||||
.unique()
|
||||
.references(() => uploadedFiles.id),
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Reference in a new issue