- staging/prod: postgres:16-alpine per the llmdev Docker spec (healthcheck,
log and memory limits, no host port); the app builds DATABASE_URI from
POSTGRES_PASSWORD and waits for a healthy database; MongoDB kept for one
release (rollback path, transfer source)
- dev: PostgreSQL replaces MongoDB and Mongo Express (host port 5433, checked
and registered); integration test rewritten with pg
- deploy.sh: pg_dump (and, during the switch, mongodump) before the build
- pg/@types/pg pinned to the adapter's 8.20.0 (one copy, no type clash)
- docs: CLAUDE.md, architecture/testing steering, deploy workflow, DOCKER.md;
staging switch runbook in the design
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- postgresAdapter (uuid ids, no push, prodMigrations), DATABASE_URI
- src/payload.shared.ts: the config without the db adapter, shared with the
one-off MongoDB content transfer
- baseline migration 20260929_200306_initial (86 tables; applied twice on a
disposable PostgreSQL 16: second run is a no-op)
- seed copy (references, hosting plans) moved to src/content/seeds/
- MongoDB data migrations, their helpers/tests and the dead lib/mongodb.ts
removed (kept in git history)
- npm scripts for the Payload CLI (works now that the package is ESM)
Branch only: staging has no PostgreSQL yet (tasks 3.x).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Payload CLI failed with ERR_REQUIRE_ASYNC_MODULE on Node 22 and 26 alike:
without "type": "module" it loaded payload.config.ts as CommonJS and could
not require the top-level-await ESM @payloadcms/richtext-lexical. Following
the official Payload template: "type": "module", CommonJS jest files and the
content schema renamed to .cjs, ESLint globs updated. Next's standalone
server.js is ESM and starts; 516 unit tests, tsc, lint and build are green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/check-ports.sh checks a port list or a compose file (locally or on a
remote host over SSH) before anything is built or started; a port counts as
owned only by the same compose project and service. deploy.sh runs it before
the build; tests are part of the pre-deploy suite. Found: the dev compose
clashes on llmdev (3001: step, 8081: mozdit staging).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Payload db-postgres (uuid ids, no push), fresh baseline migration, one-off
lossless data migration from the staging MongoDB, Compose per the llmdev Docker
spec, pg_dump backups, Node 22 for the Payload CLI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>