Skip to content

Commit 4f778bc

Browse files
committed
feat: Add reactions feature with toggle functionality and database integration
1 parent 910d6f0 commit 4f778bc

File tree

11 files changed

+1127
-26
lines changed

11 files changed

+1127
-26
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CREATE TABLE "reactions" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"user_id" uuid NOT NULL,
4+
"resource_id" uuid NOT NULL,
5+
"resource_type" varchar(50) NOT NULL,
6+
"reaction_type" varchar(50) NOT NULL,
7+
"created_at" timestamp,
8+
"updated_at" timestamp
9+
);
10+
--> statement-breakpoint
11+
ALTER TABLE "reactions" ADD CONSTRAINT "reactions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;

0 commit comments

Comments
 (0)