mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 17:24:56 +03:00
fix: empty and restore over 1,000 items (#12751)
This commit is contained in:
16
server/src/migrations/1726593009549-AddAssetStatus.ts
Normal file
16
server/src/migrations/1726593009549-AddAssetStatus.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddAssetStatus1726593009549 implements MigrationInterface {
|
||||
name = 'AddAssetStatus1726593009549'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TYPE "assets_status_enum" AS ENUM('active', 'trashed', 'deleted')`);
|
||||
await queryRunner.query(`ALTER TABLE "assets" ADD "status" "assets_status_enum" NOT NULL DEFAULT 'active'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "assets" DROP COLUMN "status"`);
|
||||
await queryRunner.query(`DROP TYPE "assets_status_enum"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user