Merge main with notdienst planning and notification improvements
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Family invitation delivery status; applied before the restricted runtime starts.
|
||||
ALTER TABLE "invitations"
|
||||
ADD COLUMN "userId" TEXT,
|
||||
ADD COLUMN "sentAt" TIMESTAMP(3),
|
||||
ADD COLUMN "lastAttemptAt" TIMESTAMP(3),
|
||||
ADD COLUMN "leaseUntil" TIMESTAMP(3),
|
||||
ADD COLUMN "attempts" INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN "failed" BOOLEAN NOT NULL DEFAULT false;
|
||||
CREATE UNIQUE INDEX "invitations_userId_key" ON "invitations"("userId");
|
||||
ALTER TABLE "invitations" ADD CONSTRAINT "invitations_userId_fkey"
|
||||
FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE "invitations" ADD CONSTRAINT "invitations_userId_tenant_fkey"
|
||||
FOREIGN KEY ("userId", "kitaId") REFERENCES "users"("id", "kitaId") ON DELETE CASCADE ON UPDATE NO ACTION;
|
||||
Reference in New Issue
Block a user