npm run build automatically prepares standalone assets via postbuild (.next/static and public are copied into .next/standalone).
If you connect the project to a fresh or different Postgres database, run the Payload migrations before building or starting the standalone server.
Check migration status:
npm run migrate:statusApply all pending migrations:
npm run migrateCreate a new migration after schema/config changes:
npm run migrate:create your-migration-nameNotes:
npm run devcan be more forgiving during development, butnpm run standaloneexpects the Payload tables to exist./adminrequires the Payload auth tables such asusersto exist.- Run migrations against the same database that is configured in
DATABASE_URL.
After the database schema exists, build the app:
npm run buildnpm run standaloneRecommended order for a fresh database:
npm run migrate
npm run build
npm run standaloneContent is loaded directly from the configured Postgres database via Payload queries.