Add more airlines and fix edit bugs

This commit is contained in:
2026-04-18 16:45:13 +10:00
parent 63d6fb9e76
commit d90f338321
12 changed files with 111 additions and 28 deletions
@@ -2,6 +2,7 @@
use App\Models\Airline;
use App\Models\Country;
use App\Models\SeatType;
use App\Models\UserFlight;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
@@ -77,6 +78,8 @@ return new class extends Migration
UserFlight::where('flight_reason_id', null)->update(['flight_reason_id' => 0]);
UserFlight::where('flight_class_id', null)->update(['flight_class_id' => 0]);
UserFlight::where('flight_reason_id', 0)->update(['flight_reason_id' => 1]);
SeatType::where('id', 0)->update(['name' => 'Unassigned']);
}
/**
@@ -0,0 +1,36 @@
<?php
use App\Models\Airport;
use App\Models\Country;
use App\Models\Region;
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
{
Airport::create([
'name' => 'Horizontal Falls Pontoon',
'region_id' => Region::whereCode('AU-WA')->first()->id,
'municipality' => 'Horizontal Falls',
'latitude_deg' => -16.373295,
'longitude_deg' => 123.964757,
'elevation_ft' => 0,
'type' => 'seaplane_base',
'timezone' => 'Australia/Perth',
]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};