mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +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:
@@ -8,6 +8,7 @@
|
||||
* bundle), via a real MikroORM over the full migrated schema (`createSnapshotTestDb`
|
||||
* + `createTestOrm`) rather than a hand-rolled `:memory:` table set.
|
||||
*/
|
||||
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';
|
||||
@@ -47,7 +48,7 @@ beforeAll(async () => {
|
||||
actions: t.repo(PluginActions),
|
||||
settingsFields: t.repo(PluginSettingsFields),
|
||||
errorLog: t.repo(PluginErrorLog),
|
||||
uow: new UnitOfWork(t.em),
|
||||
uow: new UnitOfWork(t.em, new SqliteEngine()),
|
||||
};
|
||||
});
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user