import { MigrationInterface, QueryRunner } from 'typeorm';

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

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

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