"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FixOnboardingCollations1786252000000 = void 0;
class FixOnboardingCollations1786252000000 {
    constructor() {
        this.name = "FixOnboardingCollations1786252000000";
    }
    async up(queryRunner) {
        await queryRunner.query(`SET FOREIGN_KEY_CHECKS = 0;`);
        const tables = [
            "onboarding_templates",
            "onboarding_template_tasks",
            "onboarding_cases",
            "onboarding_tasks",
            "onboarding_documents",
            "provisioning_items",
            "buddy_assignments",
            "onboarding_surveys",
            "probations",
            "probation_reviews",
            "offboarding_templates",
            "offboarding_template_tasks",
            "offboarding_cases",
            "offboarding_tasks",
            "equipment_returns",
            "exit_interview_templates",
            "exit_interviews",
            "final_settlements",
            "final_settlement_items",
        ];
        for (const table of tables) {
            try {
                await queryRunner.query(`ALTER TABLE \`${table}\` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci`);
            }
            catch (e) { }
        }
        await queryRunner.query(`SET FOREIGN_KEY_CHECKS = 1;`);
    }
    async down(queryRunner) { }
}
exports.FixOnboardingCollations1786252000000 = FixOnboardingCollations1786252000000;
//# sourceMappingURL=1786252000000-FixOnboardingCollations.js.map