22 lines
694 B
TypeScript
22 lines
694 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddColumnOtpCode1748935417155 implements MigrationInterface {
|
|
name = 'AddColumnOtpCode1748935417155';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "vip_codes" ADD "otp_code" character varying`,
|
|
);
|
|
await queryRunner.query(
|
|
`ALTER TABLE "transactions" ADD "otp_code" character varying`,
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "transactions" DROP COLUMN "otp_code"`,
|
|
);
|
|
await queryRunner.query(`ALTER TABLE "vip_codes" DROP COLUMN "otp_code"`);
|
|
}
|
|
}
|