mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: empty and restore over 1,000 items (#12751)
This commit is contained in:
parent
4f25cec6df
commit
6740c67ed8
39 changed files with 540 additions and 145 deletions
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"`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue