-- CreateTable
CREATE TABLE "IiosProjectionCursor" (
    "id" TEXT NOT NULL,
    "projectionName" TEXT NOT NULL,
    "sourceTopic" TEXT NOT NULL,
    "partitionKey" TEXT NOT NULL,
    "lastEventId" TEXT NOT NULL,
    "lastOffset" INTEGER NOT NULL DEFAULT 0,
    "checksum" TEXT NOT NULL,
    "updatedAt" TIMESTAMP(3) NOT NULL,

    CONSTRAINT "IiosProjectionCursor_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE INDEX "IiosProjectionCursor_partitionKey_idx" ON "IiosProjectionCursor"("partitionKey");

-- CreateIndex
CREATE UNIQUE INDEX "IiosProjectionCursor_projectionName_sourceTopic_partitionKe_key" ON "IiosProjectionCursor"("projectionName", "sourceTopic", "partitionKey");
