mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
chore: migrate database files (#8126)
This commit is contained in:
14
server/src/migrations/1680632845740-AddIsArchivedColumn.ts
Normal file
14
server/src/migrations/1680632845740-AddIsArchivedColumn.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddIsArchivedColumn1680632845740 implements MigrationInterface {
|
||||
name = 'AddIsArchivedColumn1680632845740'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "assets" ADD "isArchived" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "assets" DROP COLUMN "isArchived"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user