-- AlterTable
ALTER TABLE "IiosSourceHandle" ADD COLUMN     "redactedAt" TIMESTAMP(3);

-- CreateTable
CREATE TABLE "IiosComplianceHold" (
    "id" TEXT NOT NULL,
    "scopeId" TEXT NOT NULL,
    "targetType" TEXT NOT NULL,
    "targetId" TEXT NOT NULL,
    "holdReason" TEXT NOT NULL,
    "appliedByActorId" TEXT,
    "status" TEXT NOT NULL DEFAULT 'ACTIVE',
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "expiresAt" TIMESTAMP(3),
    "releasedAt" TIMESTAMP(3),

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

-- CreateIndex
CREATE INDEX "IiosComplianceHold_scopeId_targetType_targetId_status_idx" ON "IiosComplianceHold"("scopeId", "targetType", "targetId", "status");
