rever
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
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;
|
|
@@ -0,0 +1,5 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "EmailEvent" ADD COLUMN "teamId" INTEGER;
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "EmailEvent_teamId_idx" ON "EmailEvent"("teamId");
|
@@ -118,7 +118,6 @@ model Team {
|
|||||||
subscription Subscription[]
|
subscription Subscription[]
|
||||||
invites TeamInvite[]
|
invites TeamInvite[]
|
||||||
suppressionList SuppressionList[]
|
suppressionList SuppressionList[]
|
||||||
emailEvents EmailEvent[]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model TeamInvite {
|
model TeamInvite {
|
||||||
@@ -262,10 +261,9 @@ model EmailEvent {
|
|||||||
emailId String
|
emailId String
|
||||||
status EmailStatus
|
status EmailStatus
|
||||||
data Json?
|
data Json?
|
||||||
teamId Int
|
teamId Int?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
email Email @relation(fields: [emailId], references: [id], onDelete: Cascade)
|
email Email @relation(fields: [emailId], references: [id], onDelete: Cascade)
|
||||||
team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
|
|
||||||
|
|
||||||
@@index([emailId])
|
@@index([emailId])
|
||||||
@@index([teamId])
|
@@index([teamId])
|
||||||
|
Reference in New Issue
Block a user