# Catalogue-schema migrations

Migrations for the SHARED master catalogue schema (`master_projects` — the
`catalogue` connection). See `docs/planning/master-catalogue-shared-database-plan.md`.

Rules:

- A change to any catalogue-family table (`catalog_*` on the catalogue
  connection, `developers`, `developer_relationships`, the `market_*` reference
  family, master `media`, master `countries`/`data_providers`) lives HERE,
  never in `database/migrations/`.
- Each migration is applied to **both** connections — the master schema and
  every site's local catalogue tables (sites keep the same shape for their own
  local projects). The deploy runs:

      php artisan migrate --path=database/migrations/catalogue --database=catalogue
      php artisan migrate --path=database/migrations/catalogue

  One file, two targets, no drift.
- Only the Hub's deploy pipeline may run the `--database=catalogue` line
  against production. A site deploy must never ALTER the master.
- The master schema's BASELINE is the seeded copy of the prod catalogue —
  there is deliberately no create-from-scratch history here.
