<?php

use App\Models\Airline;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        $airlines = [
            ['internalName' => 'jetstar-pacific',     'logo' => 'JQ.png'],
            ['internalName' => 'jetsmart',            'logo' => 'JA.png'],
            ['internalName' => 'jetsmart-peru',       'logo' => 'JZ.png'],
            ['internalName' => 'jetsmart-argentina',  'logo' => 'WJ.png'],
            ['internalName' => 'jetsmart-colombia',   'logo' => 'J6.png'],
        ];

        foreach ($airlines as $airline) {
            Airline::where('internal_name', $airline['internalName'])
                ->update(['logo' => $airline['logo']]);
        }
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        //
    }
};
