import { MigrationInterface, QueryRunner } from 'typeorm';

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

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE \`siteinfos\`
        ADD \`saturdayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`days\`,
        ADD \`sundayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`saturdayServiceClosed\`,
        ADD \`mondayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`sundayServiceClosed\`,
        ADD \`tuesdayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`mondayServiceClosed\`,
        ADD \`wednesdayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`tuesdayServiceClosed\`,
        ADD \`thursdayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`wednesdayServiceClosed\`,
        ADD \`fridayServiceClosed\` TINYINT(1) NULL DEFAULT '0' AFTER \`thursdayServiceClosed\``,
    );
  }

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