Files
buzz-sheet/drizzle/0068_concerned_union_jack.sql
gunshiz 3473b55768
CI / Verify (push) Successful in 1m48s
CI / Build immutable images and deploy (push) Successful in 2m47s
feat(commission) : add push notifications and unread ticket titles
2026-10-02 11:51:05 +07:00

11 lines
611 B
SQL

CREATE TABLE "commission"."push_subscription" (
"endpoint" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"scope" varchar(8) NOT NULL,
"p256dh" text NOT NULL,
"auth" text NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "commission"."push_subscription" ADD CONSTRAINT "push_subscription_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "auth"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "commission_push_subscription_user_idx" ON "commission"."push_subscription" USING btree ("user_id");