store reference assets on supabase

This commit is contained in:
wass08
2026-02-26 09:56:50 +09:00
parent 1117e0cb5f
commit b167702bca
10 changed files with 1438 additions and 15 deletions
@@ -0,0 +1,14 @@
CREATE TABLE "project_assets" (
"id" text PRIMARY KEY NOT NULL,
"project_id" text NOT NULL,
"storage_key" text NOT NULL,
"url" text NOT NULL,
"type" text NOT NULL,
"original_name" text,
"mime_type" text,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "project_assets" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
ALTER TABLE "project_assets" ADD CONSTRAINT "project_assets_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;