"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkScheduleCorrectionLimit1781030000000 = void 0;
class WorkScheduleCorrectionLimit1781030000000 {
    constructor() {
        this.name = 'WorkScheduleCorrectionLimit1781030000000';
    }
    async up(queryRunner) {
        const table = await queryRunner.getTable('working_schedule');
        const hasColumn = table?.columns.some((column) => column.name === 'monthly_correction_limit');
        if (!hasColumn) {
            await queryRunner.query(`
        ALTER TABLE \`working_schedule\`
          ADD COLUMN \`monthly_correction_limit\` INT NOT NULL DEFAULT 2 AFTER \`timezone\`
      `);
        }
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('working_schedule');
        const hasColumn = table?.columns.some((column) => column.name === 'monthly_correction_limit');
        if (hasColumn) {
            await queryRunner.query(`
        ALTER TABLE \`working_schedule\` DROP COLUMN \`monthly_correction_limit\`
      `);
        }
    }
}
exports.WorkScheduleCorrectionLimit1781030000000 = WorkScheduleCorrectionLimit1781030000000;
//# sourceMappingURL=1781030000000-WorkScheduleCorrectionLimit.js.map