reset totp

This commit is contained in:
Julian Krauser 2024-11-23 12:11:19 +01:00
parent 48a8d1fb45
commit fa1eb6a5f0
14 changed files with 354 additions and 83 deletions

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class ResetToken1732358596823 implements MigrationInterface {
name = "ResetToken1732358596823";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: "reset",
columns: [
{ name: "mail", type: "varchar", length: "255", isPrimary: true, isNullable: false },
{ name: "token", type: "varchar", length: "255", isNullable: false },
{ name: "username", type: "varchar", length: "255", isNullable: false },
{ name: "secret", type: "varchar", length: "255", isNullable: false },
],
}),
true
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable("reset");
}
}