mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 01:11:20 +03:00
chore: migrate database files (#8126)
This commit is contained in:
14
server/src/migrations/1699889987493-AddAvatarColor.ts
Normal file
14
server/src/migrations/1699889987493-AddAvatarColor.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddAvatarColor1699889987493 implements MigrationInterface {
|
||||
name = 'AddAvatarColor1699889987493'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "users" ADD "avatarColor" character varying`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "avatarColor"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user