diff --git a/database/migrations/2026_04_01_041000_add_bonza.php b/database/migrations/2026_04_01_041000_add_bonza.php new file mode 100644 index 0000000..e3e56ac --- /dev/null +++ b/database/migrations/2026_04_01_041000_add_bonza.php @@ -0,0 +1,53 @@ +where('IATA_code', 'AB') + ->update(['logo' => null]); + + DB::table('airlines') + ->where('IATA_code', 'AB') + ->where('ICAO_code', 'BER') + ->update(['active' => false]); + + + DB::table('airlines')->insert([ + 'IATA_code' => 'AB', + 'ICAO_code' => 'BNZ', + 'name' => 'Bonza', + 'internal_name' => 'bonza', + 'country_code' => 'AU', + 'country_name' => 'Australia', + 'active' => false, + 'logo' => 'AB.png', + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + DB::table('airlines')->where('internal_name', 'bonza')->delete(); + DB::table('airlines') + ->where('IATA_code', 'AB') + ->update(['logo' => 'AB.png']); + DB::table('airlines') + ->where('IATA_code', 'AB') + ->where('ICAO_code', 'BER') + ->update(['active' => true]); + + } +};