mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: database repository (#16593)
* refactor: database repository * fix error reindex check * chore: remove WIP code --------- Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
parent
fe931faf17
commit
2cdbb0a37c
17 changed files with 197 additions and 315 deletions
|
|
@ -53,7 +53,6 @@ const globalSetup = async () => {
|
|||
// @ts-expect-error
|
||||
const dataSource = new DataSource(config);
|
||||
await dataSource.initialize();
|
||||
await dataSource.query('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"');
|
||||
await dataSource.runMigrations();
|
||||
await dataSource.destroy();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ import { Mocked, vitest } from 'vitest';
|
|||
|
||||
export const newDatabaseRepositoryMock = (): Mocked<RepositoryInterface<DatabaseRepository>> => {
|
||||
return {
|
||||
init: vitest.fn(),
|
||||
shutdown: vitest.fn(),
|
||||
reconnect: vitest.fn(),
|
||||
getExtensionVersion: vitest.fn(),
|
||||
getExtensionVersionRange: vitest.fn(),
|
||||
getPostgresVersion: vitest.fn().mockResolvedValue('14.10 (Debian 14.10-1.pgdg120+1)'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue