mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 01:11:47 +03: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:
@@ -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)'),
|
||||
|
||||
Reference in New Issue
Block a user