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:
+5
-1
@@ -21,6 +21,7 @@
|
||||
"lint:strict": "node scripts/strict-lint.mjs",
|
||||
"lint:boundaries": "node scripts/import-boundaries.mjs",
|
||||
"lint:dialect": "node scripts/dialect-lint.mjs",
|
||||
"lint:engine-dispatch": "node scripts/engine-dispatch-ratchet.mjs",
|
||||
"lint:tx": "node scripts/tx-writes.mjs",
|
||||
"lint:test-sql": "node scripts/test-sql-ratchet.mjs",
|
||||
"lint:test-mocks": "node scripts/test-mocks-ratchet.mjs",
|
||||
@@ -36,6 +37,8 @@
|
||||
"check:entities": "node --import tsx scripts/generate-entities.ts --check",
|
||||
"gen:db-types": "node --import tsx scripts/generate-db-types.ts",
|
||||
"check:db-types": "node --import tsx scripts/generate-db-types.ts --check",
|
||||
"gen:pg-baseline": "node --import tsx scripts/generate-pg-baseline.ts",
|
||||
"check:pg-baseline": "node --import tsx scripts/generate-pg-baseline.ts --check",
|
||||
"probe:pg": "node --import tsx scripts/pg-probe.ts",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
|
||||
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
|
||||
@@ -48,6 +51,7 @@
|
||||
"test:integration": "vitest run tests/integration",
|
||||
"test:ws": "vitest run tests/websocket",
|
||||
"test:e2e": "vitest run tests/e2e",
|
||||
"test:pg": "vitest run --config vitest.pg.config.ts",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
"mikro-orm": {
|
||||
@@ -63,6 +67,7 @@
|
||||
"@mikro-orm/core": "^7.2.7",
|
||||
"@mikro-orm/migrations": "^7.2.7",
|
||||
"@mikro-orm/nestjs": "^7.1.0",
|
||||
"@mikro-orm/postgresql": "^7.2.7",
|
||||
"@mikro-orm/seeder": "^7.2.7",
|
||||
"@mikro-orm/sql": "^7.2.1",
|
||||
"@mikro-orm/sqlite": "^7.2.7",
|
||||
@@ -117,7 +122,6 @@
|
||||
"@aws-lite/s3-types": "^0.2.8",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@mikro-orm/entity-generator": "^7.2.7",
|
||||
"@mikro-orm/postgresql": "^7.2.7",
|
||||
"@nestjs/testing": "^11.2.5",
|
||||
"@swc/core": "^1.16.22",
|
||||
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
||||
|
||||
Reference in New Issue
Block a user