mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
Merge branch 'main' of github.com:immich-app/immich
This commit is contained in:
commit
6f3f8b0a48
2 changed files with 18 additions and 4 deletions
|
@ -17,12 +17,9 @@ export class SmartInfoEntity {
|
||||||
objects!: string[] | null;
|
objects!: string[] | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: 'numeric',
|
type: 'float4',
|
||||||
array: true,
|
array: true,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
// note: migration generator is broken for numeric[], but these _are_ set in the database
|
|
||||||
// precision: 20,
|
|
||||||
// scale: 19,
|
|
||||||
})
|
})
|
||||||
clipEmbedding!: number[] | null;
|
clipEmbedding!: number[] | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||||
|
|
||||||
|
export class ClipEmbeddingFloat41679901204458 implements MigrationInterface {
|
||||||
|
name = 'ClipEmbeddingFloat41679901204458';
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "smart_info" ALTER COLUMN "clipEmbedding" TYPE real array USING "clipEmbedding"::real array`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(
|
||||||
|
`ALTER TABLE "smart_info" ALTER COLUMN "clipEmbedding" TYPE numeric(20,19) array USING "clipEmbedding"::numeric(20,19) array`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue