feat(cms): MongoDB → PostgreSQL content transfer; fix two schema issues it found (MITHOME-136)
- scripts/transfer-content.ts: export (shared config + MongoDB adapter, locale 'all', drafts, upload files) and import (PostgreSQL, one transaction, refuses a non-empty target); pure helpers in src/lib/content-transfer.ts - LegalPages: the section anchor is its own field; as the array row id it was a table-wide primary key in PostgreSQL and the two pages collided - Products.status: own enumName; the default name equalled the drafts _status enum, so only draft/published were accepted - baseline migration regenerated Verified on a staging copy (disposable MongoDB + PostgreSQL on llmdev): counts match, all 14 public pages (hu/en) render identical text, partner logo loads, second import writes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e3ec6a9ac3
commit
a68fb94b61