mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
full comments system
This commit is contained in:
11
packages/backend/drizzle/0021_skinny_sally_floyd.sql
Normal file
11
packages/backend/drizzle/0021_skinny_sally_floyd.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE "IssueComment" (
|
||||
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "IssueComment_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
|
||||
"issueId" integer NOT NULL,
|
||||
"userId" integer NOT NULL,
|
||||
"body" varchar(2048) NOT NULL,
|
||||
"createdAt" timestamp DEFAULT now(),
|
||||
"updatedAt" timestamp DEFAULT now()
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "IssueComment" ADD CONSTRAINT "IssueComment_issueId_Issue_id_fk" FOREIGN KEY ("issueId") REFERENCES "public"."Issue"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "IssueComment" ADD CONSTRAINT "IssueComment_userId_User_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE no action;
|
||||
Reference in New Issue
Block a user