add teamId to email events (#194)

This commit is contained in:
KM Koushik
2025-08-10 08:58:17 +10:00
committed by GitHub
parent 7ecb3d27a9
commit 46b2b64847
6 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
/*
Warnings:
- Added the required column `teamId` to the `EmailEvent` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "EmailEvent" ADD COLUMN "teamId" INTEGER NOT NULL;
-- CreateIndex
CREATE INDEX "EmailEvent_teamId_idx" ON "EmailEvent"("teamId");
-- AddForeignKey
ALTER TABLE "EmailEvent" ADD CONSTRAINT "EmailEvent_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;