-- Voice Quota — additive migration (idempotent via IF NOT EXISTS)
--
-- Adds two columns to profiles for tracking daily TTS usage per user.
-- Plan limits (from plan-features.ts): Free=60s/day, Pro=300s/day, Legend=0 (unlimited).
--
-- Cost baseline (2026-05):
--   Free  → Google TTS Neural2    ~$4/1M chars
--   Pro   → Cartesia Sonic-2      ~$4/1M chars, ~75ms first-byte
--   Legend → ElevenLabs Turbo v2.5 ~$30/1M chars (unlimited — no quota tracking)
--
-- Deploy: pnpm prisma migrate deploy (auto via GH-Actions pipeline on push to main)

ALTER TABLE "rebreak"."profiles"
    ADD COLUMN IF NOT EXISTS "voice_seconds_used_today" INTEGER NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS "voice_quota_reset_at"     TIMESTAMP(3);
