import { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateDefaultColumnTransaction1720077765890
  implements MigrationInterface
{
  name = 'UpdateDefaultColumnTransaction1720077765890';

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "transactions" ALTER COLUMN "is_recap_transaction" SET DEFAULT false`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "transactions" ALTER COLUMN "is_recap_transaction" SET DEFAULT true`,
    );
  }
}
