-- =====================================================
-- PT_ENTRAINMENT — logo_url / banner_url update (program_type_v1)
-- 2026-08-13
-- DRAFT ONLY — not executed against any database, not yet reviewed/approved.
-- Config only. Idempotent (plain UPDATE).
-- =====================================================
--
-- Uncomment ONLY the block for the environment you're deploying to, then run.
--
-- NOTE — entrainment-banner-animation.mp4 (banner animation/video) is NOT included below:
-- there is no animation/video column on program_type_v1 at all. The only place
-- `banner_animation_url` exists in this schema is on program_v1 and program_session (added by
-- database/date-wise-scripts.sql:4112-4121), i.e. per-PROGRAM, not per-program-type — and
-- program_type_v1.banner_url only ever feeds program.bannerImageUrl as a fallback default
-- at program-create time (program.service.ts:1315: `createDto.bannerImageUrl ||
-- programType.bannerUrl`), with no equivalent fallback wired up for an animation URL. So the
-- animation URL can't be set here — it would need to be supplied per-entrainment-program at
-- program creation time (via the program's own banner_animation_url), OR, if a
-- program-type-level default is wanted (mirroring how banner_url/logo_url work), that requires
-- an actual schema change (ALTER TABLE program_type_v1 ADD COLUMN banner_animation_url ...)
-- plus a program.service.ts change to read it as a fallback — flagging as a separate, explicit
-- follow-up rather than assuming it's wanted. Same approach as
-- 2026-08-08-01-pt-pap-logo-banner-update.sql.
--
-- 2026-08-14 — QA/UAT entrainment-banner-animation.mp4 URLs were provided but deliberately
-- SKIPPED here per the above (no column to set them on). Still outstanding:
--   QA:  https://infinitheism-portal-qa-assets.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner-animation.mp4
--   UAT: https://infinitheism-portal-uat-assets.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner-animation.mp4
--
-- NOTE — this also updates banner_url to a new path
-- (static-images/banner/entrainment-banner.png), which differs from the value most recently
-- set by database/entrainment-migrations-v2(2026-08-10)/01program-type-refresh.sql
-- (static-images/banner/program-type/entrainment/entrainment.jpg). This migration's value
-- wins if run after that one.
-- =====================================================

-- ── Dev ──────────────────────────────────────────────
UPDATE program_type_v1
SET logo_url    = 'https://infinitheism-serverless.s3.ap-south-1.amazonaws.com/static-images/logo/entrainment-logo.svg',
    banner_url  = 'https://infinitheism-serverless.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner.png',
    updated_at  = NOW(),
    updated_by  = -2
WHERE key = 'PT_ENTRAINMENT'
  AND deleted_at IS NULL;

-- ── QA ───────────────────────────────────────────────
-- UPDATE program_type_v1
-- SET logo_url    = 'https://infinitheism-portal-qa-assets.s3.ap-south-1.amazonaws.com/static-images/logo/entrainment-logo.svg',
--     banner_url  = 'https://infinitheism-portal-qa-assets.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner.png',
--     updated_at  = NOW(),
--     updated_by  = -2
-- WHERE key = 'PT_ENTRAINMENT'
--   AND deleted_at IS NULL;

-- ── UAT ──────────────────────────────────────────────
-- UPDATE program_type_v1
-- SET logo_url    = 'https://infinitheism-portal-uat-assets.s3.ap-south-1.amazonaws.com/static-images/logo/entrainment-logo.svg',
--     banner_url  = 'https://infinitheism-portal-uat-assets.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner.png',
--     updated_at  = NOW(),
--     updated_by  = -2
-- WHERE key = 'PT_ENTRAINMENT'
--   AND deleted_at IS NULL;

-- ── Prod ─────────────────────────────────────────────
-- UPDATE program_type_v1
-- SET logo_url    = 'https://infinitheism-portal-prod-assets.s3.ap-south-1.amazonaws.com/static-images/logo/entrainment-logo.svg',
--     banner_url  = 'https://infinitheism-portal-prod-assets.s3.ap-south-1.amazonaws.com/static-images/banner/entrainment-banner.png',
--     updated_at  = NOW(),
--     updated_by  = -2
-- WHERE key = 'PT_ENTRAINMENT'
--   AND deleted_at IS NULL;
