18 lines
551 B
SQL
18 lines
551 B
SQL
-- CreateTable
|
|
CREATE TABLE "UnsubscribeHistory" (
|
|
"id" TEXT NOT NULL,
|
|
"tenantId" TEXT NOT NULL,
|
|
"dedupeKey" TEXT NOT NULL,
|
|
"target" TEXT NOT NULL,
|
|
"status" TEXT NOT NULL,
|
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
CONSTRAINT "UnsubscribeHistory_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "UnsubscribeHistory_tenantId_dedupeKey_key" ON "UnsubscribeHistory"("tenantId", "dedupeKey");
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "UnsubscribeHistory_tenantId_idx" ON "UnsubscribeHistory"("tenantId");
|