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:
Isaias Tavares
2026-11-05 01:15:21 -03:00
committed by Maurice
parent 17b47b38b9
commit 2e3762afe1
176 changed files with 6728 additions and 777 deletions
@@ -3,6 +3,7 @@
* install a pinned version through the full verify -> extract -> validate ->
* move -> register pipeline (with the network download mocked).
*/
import { SqliteEngine } from '../../../src/db/engine/sqlite/sqlite-engine';
import { PluginActions } from '../../../src/db/entities/PluginActions.entity';
import { PluginErrorLog } from '../../../src/db/entities/PluginErrorLog.entity';
import { PluginSettingsFields } from '../../../src/db/entities/PluginSettingsFields.entity';
@@ -148,7 +149,7 @@ beforeEach(() => {
t.repo(PluginActions),
t.repo(PluginSettingsFields),
t.repo(PluginErrorLog),
new UnitOfWork(t.em),
new UnitOfWork(t.em, new SqliteEngine()),
);
});
afterEach(() => {