Files
buzz-sheet/drizzle/0077_reflective_chimera.sql
gunshiz 5812d99715
CI / Verify (push) Successful in 2m30s
CI / Build immutable images and deploy (push) Successful in 3m9s
feat : comment feature
2026-10-08 01:40:08 +07:00

8 lines
429 B
SQL

CREATE TABLE "comments"."read_state" (
"user_id" text NOT NULL,
"target" text NOT NULL,
"seen_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "read_state_user_id_target_pk" PRIMARY KEY("user_id","target")
);
--> statement-breakpoint
ALTER TABLE "comments"."read_state" ADD CONSTRAINT "read_state_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "auth"."user"("id") ON DELETE cascade ON UPDATE no action;