"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkScheduleTimezone1780950000000 = void 0;
class WorkScheduleTimezone1780950000000 {
    constructor() {
        this.name = 'WorkScheduleTimezone1780950000000';
    }
    async up(queryRunner) {
        const table = await queryRunner.getTable('working_schedule');
        const hasTimezone = table?.columns.some((column) => column.name === 'timezone');
        if (!hasTimezone) {
            await queryRunner.query(`
        ALTER TABLE \`working_schedule\`
          ADD COLUMN \`timezone\` VARCHAR(64) NOT NULL DEFAULT 'Asia/Dhaka' AFTER \`half_day_max_time\`
      `);
        }
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('working_schedule');
        const hasTimezone = table?.columns.some((column) => column.name === 'timezone');
        if (hasTimezone) {
            await queryRunner.query(`
        ALTER TABLE \`working_schedule\` DROP COLUMN \`timezone\`
      `);
        }
    }
}
exports.WorkScheduleTimezone1780950000000 = WorkScheduleTimezone1780950000000;
//# sourceMappingURL=1780950000000-WorkScheduleTimezone.js.map