feat: add threaded comments, activity feeds, and task dependencies
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE "comments" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"entity_type" text NOT NULL,
|
||||
"entity_id" uuid NOT NULL,
|
||||
"workspace_id" uuid NOT NULL,
|
||||
"parent_id" uuid,
|
||||
"author" text NOT NULL,
|
||||
"content" text NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"deleted_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "comments" ADD CONSTRAINT "comments_workspace_id_domains_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."domains"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "comments" ADD CONSTRAINT "comments_parent_id_comments_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."comments"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX "comments_workspace_id_idx" ON "comments" USING btree ("workspace_id");--> statement-breakpoint
|
||||
CREATE INDEX "comments_entity_idx" ON "comments" USING btree ("entity_type","entity_id");--> statement-breakpoint
|
||||
CREATE INDEX "comments_parent_id_idx" ON "comments" USING btree ("parent_id");--> statement-breakpoint
|
||||
CREATE INDEX "comments_created_at_idx" ON "comments" USING btree ("created_at");
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"id": "0002-snapshot-id",
|
||||
"prevId": "0002-snapshot-id",
|
||||
"id": "e8a3c1d2-0a2b-4c3d-9e4f-5a6b7c8d9e0f",
|
||||
"prevId": "f29d0874-5760-4ab6-aaa5-e910f7e8637e",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
"tables": {
|
||||
@@ -2598,4 +2598,4 @@
|
||||
"schemas": {},
|
||||
"tables": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1619
-6
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,13 @@
|
||||
"when": 1785557679802,
|
||||
"tag": "0005_search_vector_trigger",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "7",
|
||||
"when": 1786392464857,
|
||||
"tag": "0006_minor_doctor_octopus",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user