chore(server): remove unused column (#9431)

* chore(server): remove unused column

* fix: broken migrations
This commit is contained in:
Jason Rasmussen
2024-05-13 16:40:16 -04:00
committed by GitHub
parent 1bebc7368c
commit 844f5a16a1
9 changed files with 25 additions and 147 deletions
@@ -0,0 +1,21 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class RemoveTextSearchColumn1715623169039 implements MigrationInterface {
name = 'RemoveTextSearchColumn1715623169039'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "exifTextSearchableColumn"`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "exif" ADD "exifTextSearchableColumn" tsvector GENERATED ALWAYS AS (TO_TSVECTOR('english',
COALESCE(make, '') || ' ' ||
COALESCE(model, '') || ' ' ||
COALESCE(orientation, '') || ' ' ||
COALESCE("lensModel", '') || ' ' ||
COALESCE("city", '') || ' ' ||
COALESCE("state", '') || ' ' ||
COALESCE("country", ''))) STORED NOT NULL`);
}
}