chore: ADD migration for DB new Index logins__email

This commit is contained in:
Grégoire Cutzach 2024-09-30 12:02:06 +02:00
parent 06ff057082
commit 013e94e470
No known key found for this signature in database
GPG Key ID: AA4155BE23C375E6

View File

@ -0,0 +1,16 @@
import {MigrationInterface, QueryRunner, TableIndex} from "typeorm";
export class LoginsEmailsIndex1727689195356 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.createIndex("logins", new TableIndex({
name: "logins__email",
columnNames: ["email"]
}));
}
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.dropIndex("logins", "logins__email");
}
}