Files
immich/server/src/infra/migrations/1679901204458-ClipEmbeddingFloat4.ts
Jason Rasmussen 8ebac41318 refactor(server)*: tsconfigs (#2689)
* refactor(server): tsconfigs

* chore: dummy commit

* fix: start.sh

* chore: restore original entry scripts
2023-06-08 10:01:07 -05:00

18 lines
637 B
TypeScript

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`,
);
}
}