import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';

export class AlterAppUsersTableToAddNotificationKey1730266163067
  implements MigrationInterface
{
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.addColumn(
      'app_users',
      new TableColumn({
        name: 'notify',
        type: 'boolean',
        default: true,
        isNullable: true,
      }),
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.dropColumn('app_users', 'notify');
  }
}
