← back to Stayclaim

db/migrations/021_restaurant_image_credits.sql

16 lines

-- Image-credit columns for restaurant.
--
-- Per Steve's standing rule "Zero stock images — public domain only", every
-- hero_image must carry a verifiable source + license string. Closed-restaurant
-- imagery comes from the allowed-archives list:
--   USC DigLib · LAPL Photo Collection · Wikimedia Commons · Internet Archive
--   Calisphere · Library of Congress · Wikipedia
--
-- Display contract: any non-NULL hero_image renders WITH a visible caption
-- showing credit + license. No silent uncredited images.

ALTER TABLE restaurant
  ADD COLUMN IF NOT EXISTS hero_image_credit       text,  -- e.g., "Photo: Herald-Examiner Collection / LAPL"
  ADD COLUMN IF NOT EXISTS hero_image_license      text,  -- e.g., "Public Domain", "CC BY-SA 4.0", "LAPL Photo #00012345"
  ADD COLUMN IF NOT EXISTS hero_image_source_url   text;  -- link back to the archive's record page