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:
@@ -124,9 +124,16 @@ export function classify(file) {
|
||||
return 'source';
|
||||
}
|
||||
|
||||
/** PRAGMA is fine in src/db/*.ts (connection, durability, baseline, snapshot) and the migrations. */
|
||||
/**
|
||||
* PRAGMA is fine in src/db/*.ts (connection, durability, baseline, snapshot),
|
||||
* the migrations and the SQLite engine's own folder (src/db/engine/sqlite/).
|
||||
*/
|
||||
export function pragmaAllowed(file) {
|
||||
return /^src\/db\/[^/]+\.ts$/.test(file) || file.startsWith('src/db/migrations/');
|
||||
return (
|
||||
/^src\/db\/[^/]+\.ts$/.test(file) ||
|
||||
file.startsWith('src/db/migrations/') ||
|
||||
file.startsWith('src/db/engine/sqlite/')
|
||||
);
|
||||
}
|
||||
|
||||
function isSqlTag(node) {
|
||||
|
||||
Reference in New Issue
Block a user