mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
17 lines
730 B
TypeScript
17 lines
730 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class AddStorageLabel1684410565398 implements MigrationInterface {
|
|
name = 'AddStorageLabel1684410565398'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "users" ADD "storageLabel" character varying`);
|
|
await queryRunner.query(`ALTER TABLE "users" ADD CONSTRAINT "UQ_b309cf34fa58137c416b32cea3a" UNIQUE ("storageLabel")`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "users" DROP CONSTRAINT "UQ_b309cf34fa58137c416b32cea3a"`);
|
|
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "storageLabel"`);
|
|
}
|
|
|
|
}
|