Files
FlightsAPI/database/migrations/2026_04_05_081330_fix_gol.php
2026-04-05 18:49:02 +10:00

56 lines
1.3 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
public function up(): void
{
DB::table('airlines')
->where('internal_name', 'gol-airlines')
->update([
'ICAO_code' => 'GLO',
'active' => true,
]);
DB::table('airlines')
->where('internal_name', 'jetgo')
->update([
'logo' => 'JG_1.png',
'active' => false,
]);
DB::table('airlines')
->where('internal_name', 'turpial')
->update([
'logo' => 'T9.png',
'IATA_code' => 'T9',
]);
}
public function down(): void
{
DB::table('airlines')
->where('internal_name', 'gol-airlines')
->update([
'ICAO_code' => '',
'active' => false,
]);
DB::table('airlines')
->where('internal_name', 'jetgo')
->update([
'logo' => 'JG.png',
'active' => true,
]);
DB::table('airlines')
->where('internal_name', 'turpial')
->update([
'logo' => '',
'IATA_code' => '',
]);
}
};