mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server): startup check for pgvecto.rs (#5815)
* startup check for pgvecto.rs * prefilter after assertion * formatting * add assert to migration * more specific import * use runner
This commit is contained in:
parent
fade8b627f
commit
de1514a441
5 changed files with 53 additions and 15 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { AssetCreate, IJobRepository, JobItem, JobItemHandler, LibraryResponseDto, QueueName } from '@app/domain';
|
||||
import { AppModule } from '@app/immich';
|
||||
import { dataSource } from '@app/infra';
|
||||
import { dataSource, databaseChecks } from '@app/infra';
|
||||
import { AssetEntity, AssetType, LibraryType } from '@app/infra/entities';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
|
|
@ -22,11 +22,7 @@ export interface ResetOptions {
|
|||
}
|
||||
export const db = {
|
||||
reset: async (options?: ResetOptions) => {
|
||||
if (!dataSource.isInitialized) {
|
||||
await dataSource.initialize();
|
||||
}
|
||||
|
||||
await dataSource.query(`SET vectors.enable_prefilter = on`);
|
||||
await databaseChecks();
|
||||
await dataSource.transaction(async (em) => {
|
||||
const entities = options?.entities || [];
|
||||
const tableNames =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue