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:
14
server/src/migrations/1709870213078-AddUserStatus.ts
Normal file
14
server/src/migrations/1709870213078-AddUserStatus.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddUserStatus1709870213078 implements MigrationInterface {
|
||||
name = 'AddUserStatus1709870213078'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "users" ADD "status" character varying NOT NULL DEFAULT 'active'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "status"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user