import { MigrationInterface, QueryRunner } from 'typeorm';

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

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

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