push service

This commit is contained in:
toni
2026-03-13 21:54:43 +01:00
parent 71ca4d81e1
commit 29c6828dd1
23 changed files with 526 additions and 137 deletions
@@ -0,0 +1,26 @@
/*
Warnings:
- You are about to drop the column `userSubscriptionId` on the `PushSubscription` table. All the data in the column will be lost.
- Added the required column `clientId` to the `PushSubscription` table without a default value. This is not possible if the table is not empty.
- Added the required column `topic` to the `PushSubscription` table without a default value. This is not possible if the table is not empty.
*/
-- DropIndex
DROP INDEX "PushSubscription_userSubscriptionId_key";
-- AlterTable
ALTER TABLE "PushSubscription" DROP COLUMN "userSubscriptionId",
ADD COLUMN "clientId" UUID NOT NULL,
ADD COLUMN "topic" "Topic" NOT NULL,
ADD COLUMN "topicConfiguration" JSONB;
-- CreateTable
CREATE TABLE "User" (
"id" VARCHAR NOT NULL,
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "PushSubscription" ADD CONSTRAINT "PushSubscription_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;