mirror of
https://github.com/immich-app/immich.git
synced 2025-12-29 09:14:59 +03:00
* refactor: user repository * refactor: user module * refactor: move database into infra * refactor(cli): use user core * chore: import path * chore: tests
15 lines
573 B
TypeScript
15 lines
573 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class AddUserEmailUniqueConstraint1670633210032 implements MigrationInterface {
|
|
name = 'AddUserEmailUniqueConstraint1670633210032'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "users" ADD CONSTRAINT "UQ_97672ac88f789774dd47f7c8be3" UNIQUE ("email")`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "users" DROP CONSTRAINT "UQ_97672ac88f789774dd47f7c8be3"`);
|
|
}
|
|
|
|
}
|