mirror of
https://github.com/immich-app/immich.git
synced 2025-01-19 18:26:46 +01:00
handle missing smart search embedding column
This commit is contained in:
parent
ee5f1918df
commit
43f1868598
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,7 @@ export class AddFaceSearchRelation1718486162779 implements MigrationInterface {
|
|||
embedding vector(512) NOT NULL )`);
|
||||
|
||||
await queryRunner.query(`ALTER TABLE face_search ALTER COLUMN embedding SET STORAGE EXTERNAL`);
|
||||
await queryRunner.query(`ALTER TABLE smart_search ADD COLUMN IF NOT EXISTS embedding vector(512)`);
|
||||
await queryRunner.query(`ALTER TABLE smart_search ALTER COLUMN embedding SET STORAGE EXTERNAL`);
|
||||
|
||||
await queryRunner.query(`
|
||||
|
@ -27,6 +28,11 @@ export class AddFaceSearchRelation1718486162779 implements MigrationInterface {
|
|||
await queryRunner.query(`ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE real[]`);
|
||||
await queryRunner.query(`ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE vector(512)`);
|
||||
|
||||
await queryRunner.query(`
|
||||
CREATE INDEX IF NOT EXISTS clip_index ON smart_search
|
||||
USING hnsw (embedding vector_cosine_ops)
|
||||
WITH (ef_construction = 300, m = 16)`);
|
||||
|
||||
await queryRunner.query(`
|
||||
CREATE INDEX face_index ON face_search
|
||||
USING hnsw (embedding vector_cosine_ops)
|
||||
|
|
Loading…
Reference in a new issue