00007_landing_reel_posters_cert_backfill.sql 864 B

1234567891011121314151617
  1. -- Clear cached reel posters that pre-date the 2026-05-21 PG-13 cert filter.
  2. --
  3. -- An older cron populated landing_reel_posters without applying the
  4. -- isMovieAllowedByCert filter, so the table may contain titles that would
  5. -- be rejected by the current policy. We can't cert-check from inside SQL
  6. -- (the data lives at TMDB), so the safe path is to truncate and let the
  7. -- bi-weekly cron repopulate with cert-filtered titles on its next run.
  8. --
  9. -- The route layer (src/app/api/tmdb/reel-posters/route.ts) falls back to
  10. -- a live TMDB /discover call (also cert-filtered) when the table is empty,
  11. -- so this does not cause a user-visible outage.
  12. --
  13. -- PINNED_REEL_POSTERS is not stored in this table — it's an in-code
  14. -- constant prepended at the route layer — so the truncate does not affect
  15. -- the editorial pins.
  16. TRUNCATE TABLE public.landing_reel_posters;