mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
chore: migrate database files (#8126)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user