<?php

use App\Models\Airline;
use App\Models\Country;
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
    {
        $northKorea = Country::where('code', 'KP')->first();

        Airline::where('internal_name', 'air-koryo')->update(['country_id' => $northKorea->id]);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        $southKorea = Country::where('code', 'KR')->first();

        Airline::where('internal_name', 'air-koryo')->update(['country_id' => $southKorea->id]);
    }
};
