"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddPlanTaskIdToOnboardingTasks1784659000000 = void 0;
class AddPlanTaskIdToOnboardingTasks1784659000000 {
    constructor() {
        this.name = 'AddPlanTaskIdToOnboardingTasks1784659000000';
    }
    async up(queryRunner) {
        const table = await queryRunner.getTable('onboarding_tasks');
        const hasColumn = table?.columns.some((column) => column.name === 'plan_task_id');
        if (!hasColumn) {
            await queryRunner.query(`
        ALTER TABLE \`onboarding_tasks\` ADD COLUMN \`plan_task_id\` varchar(191) NULL AFTER \`record_id\`;
      `);
        }
    }
    async down(queryRunner) {
        const table = await queryRunner.getTable('onboarding_tasks');
        const hasColumn = table?.columns.some((column) => column.name === 'plan_task_id');
        if (hasColumn) {
            await queryRunner.query(`
        ALTER TABLE \`onboarding_tasks\` DROP COLUMN \`plan_task_id\`;
      `);
        }
    }
}
exports.AddPlanTaskIdToOnboardingTasks1784659000000 = AddPlanTaskIdToOnboardingTasks1784659000000;
//# sourceMappingURL=1784659000000-AddPlanTaskIdToOnboardingTasks.js.map