-- Harden email token lifecycle (used marker + lookup index)
ALTER TABLE "EmailToken"
ADD COLUMN IF NOT EXISTS "usedAt" TIMESTAMP(3);

CREATE INDEX IF NOT EXISTS "EmailToken_userId_type_expiresAt_idx"
ON "EmailToken"("userId", "type", "expiresAt");
