import { MigrationInterface, QueryRunner } from 'typeorm';

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

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "transactions" ADD "calendar_id" character varying`,
    );
    await queryRunner.query(
      `ALTER TABLE "transactions" ADD "calendar_link" character varying`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "transactions" DROP COLUMN "calendar_id"`,
    );
    await queryRunner.query(
      `ALTER TABLE "transactions" DROP COLUMN "calendar_link"`,
    );
  }
}
