mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +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:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
import { buildApp } from '../../src/bootstrap';
|
||||
import { db as testDb } from '../../src/db/database';
|
||||
import { SqliteEngine } from '../../src/db/engine/sqlite/sqlite-engine';
|
||||
import { Addons } from '../../src/db/entities/Addons.entity';
|
||||
import { AuditLog } from '../../src/db/entities/AuditLog.entity';
|
||||
import { OauthClients } from '../../src/db/entities/OauthClients.entity';
|
||||
@@ -97,7 +98,7 @@ beforeAll(async () => {
|
||||
t.repo(OauthConsents),
|
||||
await createTestAddonsService(testDb),
|
||||
new AuditService(t.repo(AuditLog), t.repo(Users)),
|
||||
new UnitOfWork(t.em),
|
||||
new UnitOfWork(t.em, new SqliteEngine()),
|
||||
nestApp.get(CimdClientResolver),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user