mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
make file upload possible for nick
This commit is contained in:
parent
6bb04a9a72
commit
1612841a8c
4 changed files with 4594 additions and 0 deletions
10
src/app/db/migrations/0126_third_hawkeye.sql
Normal file
10
src/app/db/migrations/0126_third_hawkeye.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE "files_from_surveyor" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"portfolio_id" bigint NOT NULL,
|
||||
"property_id" bigint NOT NULL,
|
||||
"s3_json_url" text NOT NULL,
|
||||
"uploaded_at" timestamp DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "files_from_surveyor" ADD CONSTRAINT "files_from_surveyor_portfolio_id_portfolio_id_fk" FOREIGN KEY ("portfolio_id") REFERENCES "public"."portfolio"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "files_from_surveyor" ADD CONSTRAINT "files_from_surveyor_property_id_property_id_fk" FOREIGN KEY ("property_id") REFERENCES "public"."property"("id") ON DELETE no action ON UPDATE no action;
|
||||
4562
src/app/db/migrations/meta/0126_snapshot.json
Normal file
4562
src/app/db/migrations/meta/0126_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -883,6 +883,13 @@
|
|||
"when": 1762793952263,
|
||||
"tag": "0125_steady_thunderbolts",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 126,
|
||||
"version": "7",
|
||||
"when": 1762892339561,
|
||||
"tag": "0126_third_hawkeye",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
15
src/app/db/schema/files_from_surveyor.ts
Normal file
15
src/app/db/schema/files_from_surveyor.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { pgTable, uuid, bigint, text, timestamp } from "drizzle-orm/pg-core";
|
||||
import { portfolio } from "./portfolio";
|
||||
import { property } from "./property";
|
||||
|
||||
export const filesFromSurveyor = pgTable("files_from_surveyor", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
portfolioId: bigint("portfolio_id", { mode: "bigint" })
|
||||
.notNull()
|
||||
.references(() => portfolio.id),
|
||||
propertyId: bigint("property_id", { mode: "bigint" })
|
||||
.notNull()
|
||||
.references(() => property.id),
|
||||
s3JsonUrl: text("s3_json_url").notNull(),
|
||||
uploadedAt: timestamp("uploaded_at").notNull().defaultNow(),
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue