import { MigrationInterface, QueryRunner } from 'typeorm';

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

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE \`makerbrands\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`oilTechnical\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`specificationattributes\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`displayOrder\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`users\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`avatar\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`discounts\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`section\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`kilometerranges\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`max\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`servicetimes\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`isActive\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`news\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`month\``,
    );
    await queryRunner.query(
      `ALTER TABLE \`makers\` ADD \`deleted\` TINYINT(1) NULL DEFAULT '0' AFTER \`isInternal\``,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    //
  }
}
