fix(db): name the Postgres compose file in the move command hint

The boot refusal beside a SQLite install told the operator to run the move
with plain `docker compose run`, which uses the SQLite compose file. It now
gives the command the wiki gives, and PGBOOT-037 holds both to the page.
This commit is contained in:
Maurice
2026-11-18 13:20:08 +01:00
parent 69e791206e
commit 81628d78ee
3 changed files with 34 additions and 6 deletions
@@ -36,10 +36,16 @@ export interface PostgresBootstrapDeps {
sqliteLeftBehind: () => string | null;
}
/** The command that moves a SQLite install into Postgres, as the refusal names it. */
const MOVE_COMMAND_HINT =
'docker compose run --rm --user node -w /app/server app node --require tsconfig-paths/register ' +
'dist/move-to-postgres.js (npm run db:move-to-postgres in server/ outside Docker)';
/**
* The commands that move a SQLite install into Postgres, as the refusal names
* them: the one the wiki page Database-Postgres gives for a compose install,
* and the one outside Docker. A test keeps both the same as the page.
*/
export const MOVE_COMMAND_DOCKER =
'docker compose -f docker-compose.postgres.yml run --rm --user node -w /app/server app ' +
'node --require tsconfig-paths/register dist/move-to-postgres.js';
export const MOVE_COMMAND_NPM = 'npm run db:move-to-postgres';
const MOVE_COMMAND_HINT = `${MOVE_COMMAND_DOCKER} (${MOVE_COMMAND_NPM} in server/ outside Docker)`;
/**
* The refusal of a boot that would come up empty on Postgres while `file`