Add more airlines and fix edit bugs
This commit is contained in:
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user