Skip to content

Commit

Permalink
chore: ADD migration for DB new Index logins__email
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaltation committed Sep 30, 2024
1 parent 1d4498f commit 2458ae5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/gen-server/migration/1727689195356-LoginsEmailIndex.ts
Original file line number Diff line number Diff line change
@@ -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");
}
}

0 comments on commit 2458ae5

Please sign in to comment.