Skip to content

Commit 183507a

Browse files
committed
Add 3D model and editor file/url to ship page
1 parent 5a29288 commit 183507a

File tree

11 files changed

+2169
-23
lines changed

11 files changed

+2169
-23
lines changed

drizzle/0007_early_morph.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CREATE TYPE "public"."editor_file_type" AS ENUM('url', 'upload');--> statement-breakpoint
2+
ALTER TABLE "project" ADD COLUMN "editorFileType" "editor_file_type";--> statement-breakpoint
3+
ALTER TABLE "project" ADD COLUMN "editorUrl" text;--> statement-breakpoint
4+
ALTER TABLE "project" ADD COLUMN "uploadedFileUrl" text;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "project" ADD COLUMN "modelFile" text;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CREATE TABLE "ship" (
2+
"id" serial PRIMARY KEY NOT NULL,
3+
"userId" integer NOT NULL,
4+
"projectId" integer NOT NULL,
5+
"url" text NOT NULL,
6+
"editorFileType" "editor_file_type" NOT NULL,
7+
"editorUrl" text,
8+
"uploadedFileUrl" text,
9+
"modelFile" text NOT NULL,
10+
"timestamp" timestamp DEFAULT now() NOT NULL
11+
);
12+
--> statement-breakpoint
13+
ALTER TABLE "ship" ADD CONSTRAINT "ship_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
14+
ALTER TABLE "ship" ADD CONSTRAINT "ship_projectId_project_id_fk" FOREIGN KEY ("projectId") REFERENCES "public"."project"("id") ON DELETE no action ON UPDATE no action;

0 commit comments

Comments
 (0)