<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        // Rename columns with typos: asign -> assign, asigned -> assigned
        DB::statement('ALTER TABLE field_job_settings RENAME COLUMN asign_decision_id TO assign_decision_id');
        DB::statement('ALTER TABLE field_jobs RENAME COLUMN asigned_user_id TO assigned_user_id');
    }

    public function down(): void
    {
        DB::statement('ALTER TABLE field_job_settings RENAME COLUMN assign_decision_id TO asign_decision_id');
        DB::statement('ALTER TABLE field_jobs RENAME COLUMN assigned_user_id TO asigned_user_id');
    }
};
