mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +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:
@@ -4,6 +4,7 @@
|
||||
* https/SSRF guard on the endpoints, the code + refresh token exchanges (mocked fetch),
|
||||
* tokens encrypted at rest, and a stored refresh token that the plugin never sees.
|
||||
*/
|
||||
import { SqliteEngine } from '../../../src/db/engine/sqlite/sqlite-engine';
|
||||
import { PluginOauthState } from '../../../src/db/entities/PluginOauthState.entity';
|
||||
import { PluginOauthTokens } from '../../../src/db/entities/PluginOauthTokens.entity';
|
||||
import { PluginSettingsFields } from '../../../src/db/entities/PluginSettingsFields.entity';
|
||||
@@ -90,7 +91,7 @@ async function makeOauthService(): Promise<PluginOAuthService> {
|
||||
orm.repo(PluginOauthTokens),
|
||||
orm.repo(PluginOauthState),
|
||||
orm.repo(PluginSettingsFields),
|
||||
new UnitOfWork(orm.em),
|
||||
new UnitOfWork(orm.em, new SqliteEngine()),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user