-- CreateEnum
CREATE TYPE "KycEventModelName" AS ENUM ('KycEvent');

-- CreateTable
CREATE TABLE "KycEvent" (
    "modelName" "KycEventModelName" NOT NULL DEFAULT 'KycEvent',
    "id" UUID NOT NULL DEFAULT gen_random_uuid(),
    "data" JSONB NOT NULL DEFAULT '{}',
    "userId" UUID NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,

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

-- AddForeignKey
ALTER TABLE "KycEvent" ADD CONSTRAINT "KycEvent_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
