You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02:00
refactor(server): use kysely (#12857)
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { PostgresJSDialect } from 'kysely-postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import { ImmichEnvironment, ImmichWorker } from 'src/enum';
|
||||
import { EnvData, IConfigRepository } from 'src/interfaces/config.interface';
|
||||
import { DatabaseExtension } from 'src/interfaces/database.interface';
|
||||
@ -21,16 +23,24 @@ const envData: EnvData = {
|
||||
|
||||
database: {
|
||||
config: {
|
||||
connectionType: 'parts',
|
||||
database: 'immich',
|
||||
type: 'postgres',
|
||||
host: 'database',
|
||||
port: 5432,
|
||||
username: 'postgres',
|
||||
password: 'postgres',
|
||||
name: 'immich',
|
||||
synchronize: false,
|
||||
migrationsRun: true,
|
||||
kysely: {
|
||||
dialect: new PostgresJSDialect({
|
||||
postgres: postgres({ database: 'immich', host: 'database', port: 5432 }),
|
||||
}),
|
||||
log: ['error'],
|
||||
},
|
||||
typeorm: {
|
||||
connectionType: 'parts',
|
||||
database: 'immich',
|
||||
type: 'postgres',
|
||||
host: 'database',
|
||||
port: 5432,
|
||||
username: 'postgres',
|
||||
password: 'postgres',
|
||||
name: 'immich',
|
||||
synchronize: false,
|
||||
migrationsRun: true,
|
||||
},
|
||||
},
|
||||
|
||||
skipMigrations: false,
|
||||
|
@ -3,6 +3,7 @@ import { Mocked, vitest } from 'vitest';
|
||||
|
||||
export const newDatabaseRepositoryMock = (): Mocked<IDatabaseRepository> => {
|
||||
return {
|
||||
init: vitest.fn(),
|
||||
reconnect: vitest.fn(),
|
||||
getExtensionVersion: vitest.fn(),
|
||||
getExtensionVersionRange: vitest.fn(),
|
||||
|
Reference in New Issue
Block a user