mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 19:16:08 +00:00
feat(db): run TREK on PostgreSQL
TREK runs on PostgreSQL when TREK_DB_URL is set, and on SQLite as before otherwise: an engine port under src/db/engine, the dialect helpers under src/db/dialect, a Postgres baseline for the migrations up to the cut, pg_dump/pg_restore backups, a probe of every repository method against a real server and a Postgres test lane in CI.
This commit is contained in:
@@ -128,6 +128,8 @@ describe('dialect-lint.mjs', () => {
|
||||
it('DIALECT-006: PRAGMA is allowed in the src/db lifecycle files, not in a repository or a domain', () => {
|
||||
const pragma = "export const p = 'PRAGMA wal_checkpoint(TRUNCATE)';\n";
|
||||
expect(run(serverRoot({ 'src/db/durability.ts': pragma })).status).toBe(0);
|
||||
expect(run(serverRoot({ 'src/db/engine/sqlite/sqlite-maintenance.ts': pragma })).status).toBe(0);
|
||||
expect(run(serverRoot({ 'src/db/engine/postgres/maintenance.ts': pragma })).status).toBe(1);
|
||||
expect(run(serverRoot({ [REPO]: pragma })).status).toBe(1);
|
||||
expect(run(serverRoot({ 'src/nest/backup/probe.ts': pragma })).status).toBe(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user