-- AlterTable
ALTER TABLE "Activity" ADD COLUMN     "actingUserId" UUID;

-- AddForeignKey
ALTER TABLE "Activity" ADD CONSTRAINT "Activity_actingUserId_fkey" FOREIGN KEY ("actingUserId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- Copy `userId` to `actingUserId`.
UPDATE "Activity" SET "actingUserId" = "userId" WHERE "userId" IS NOT NULL;
