diff --git a/app/Database/migrations/2020_02_26_044305_modify_airports_coordinates.php b/app/Database/migrations/2020_02_26_044305_modify_airports_coordinates.php new file mode 100644 index 00000000..4803b41c --- /dev/null +++ b/app/Database/migrations/2020_02_26_044305_modify_airports_coordinates.php @@ -0,0 +1,37 @@ +decimal('lat', 10, 5)->change()->default(0.0)->nullable(); + $table->decimal('lon', 11, 5)->change()->default(0.0)->nullable(); + }); + + Schema::table('airports', function ($table) { + $table->decimal('lat', 10, 5)->change()->default(0.0)->nullable(); + $table->decimal('lon', 11, 5)->change()->default(0.0)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/app/Models/Airport.php b/app/Models/Airport.php index 4562e090..c200afb1 100644 --- a/app/Models/Airport.php +++ b/app/Models/Airport.php @@ -66,7 +66,7 @@ class Airport extends Model * Validation rules */ public static $rules = [ - 'icao' => 'required|size:4', + 'icao' => 'required', 'iata' => 'sometimes|nullable', 'name' => 'required', 'location' => 'sometimes',