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:
Jason Rasmussen 2025-03-06 13:33:24 -05:00 committed by GitHub
parent fe931faf17
commit 2cdbb0a37c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 197 additions and 315 deletions

View file

@ -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();
};

View file

@ -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)'),