diff --git a/database/migrations/2026_04_02_030531_add_tsaradia.php b/database/migrations/2026_04_02_030531_add_tsaradia.php new file mode 100644 index 0000000..078d95f --- /dev/null +++ b/database/migrations/2026_04_02_030531_add_tsaradia.php @@ -0,0 +1,50 @@ +insert([ + 'IATA_code' => 'TZ', + 'ICAO_code' => 'TDS', + 'name' => 'Tsaradia', + 'internal_name' => 'tsaradia', + 'country_code' => 'MG', + 'country_name' => 'Madagascar', + 'active' => false, + 'logo' => 'TZ.png', + ]); + + DB::table('airlines') + ->where('IATA_code', 'TZ') + ->where('internal_name', 'scoot-private') + ->update([ + 'active' => false, + 'logo' => 'TR.png', + 'name' => 'Scoot' + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + DB::table('airlines')->where('internal_name', 'tsaradia')->delete(); + DB::table('airlines') + ->where('IATA_code', 'TZ') + ->where('internal_name', 'scoot-private') + ->update([ + 'active' => true, + 'logo' => 'TZ.png', + 'name' => 'Scoot Private Limited' + ]); + } +};