From dd69f1e623b2502cc87442e1c5cc0535a36b4ad6 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 1 Apr 2026 16:34:01 +1000 Subject: [PATCH] Migration Fix --- .../2026_04_01_062821_add_v_australia.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 database/migrations/2026_04_01_062821_add_v_australia.php diff --git a/database/migrations/2026_04_01_062821_add_v_australia.php b/database/migrations/2026_04_01_062821_add_v_australia.php new file mode 100644 index 0000000..b5b4448 --- /dev/null +++ b/database/migrations/2026_04_01_062821_add_v_australia.php @@ -0,0 +1,44 @@ +where('IATA_code', 'VA') + ->where('internal_name', 'virgin-australia') + ->update(['ICAO_code' => 'VOZ']); + + DB::table('airlines')->insert([ + 'IATA_code' => 'VA', + 'ICAO_code' => 'VAU', + 'name' => 'V Australia', + 'internal_name' => 'v-australia', + 'country_code' => 'AU', + 'country_name' => 'Australia', + 'active' => false, + 'logo' => 'VA_2.png', + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + DB::table('airlines') + ->where('IATA_code', 'VA') + ->where('internal_name', 'virgin-australia') + ->update(['ICAO_code' => 'VAU']); + + DB::table('airlines')->where('internal_name', 'v-australia')->delete(); + } +};