-- CreateTable
CREATE TABLE "IiosAuditLink" (
    "id" TEXT NOT NULL,
    "traceId" TEXT,
    "correlationId" TEXT,
    "scopeId" TEXT,
    "actorRefId" TEXT,
    "action" TEXT NOT NULL,
    "resourceType" TEXT NOT NULL,
    "resourceId" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateIndex
CREATE INDEX "IiosAuditLink_traceId_idx" ON "IiosAuditLink"("traceId");

-- CreateIndex
CREATE INDEX "IiosAuditLink_resourceType_resourceId_idx" ON "IiosAuditLink"("resourceType", "resourceId");

-- CreateIndex
CREATE INDEX "IiosAuditLink_scopeId_idx" ON "IiosAuditLink"("scopeId");
