mirror of
https://github.com/immich-app/immich.git
synced 2025-10-26 08:12:33 -04:00
17 lines
739 B
TypeScript
17 lines
739 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class AddDeviceInfoToUserToken1682371791038 implements MigrationInterface {
|
|
name = 'AddDeviceInfoToUserToken1682371791038'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "user_token" ADD "deviceType" character varying NOT NULL DEFAULT ''`);
|
|
await queryRunner.query(`ALTER TABLE "user_token" ADD "deviceOS" character varying NOT NULL DEFAULT ''`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "user_token" DROP COLUMN "deviceOS"`);
|
|
await queryRunner.query(`ALTER TABLE "user_token" DROP COLUMN "deviceType"`);
|
|
}
|
|
|
|
}
|