Fix distance field types

This commit is contained in:
Nabeel Shahzad 2018-01-30 11:09:59 -06:00
parent 29c0f3cdaf
commit 0fbd8e5d68
2 changed files with 5 additions and 4 deletions

View File

@ -28,9 +28,9 @@ class CreatePirepTables extends Migration
$table->string('route_leg', 5)->nullable();
$table->string('dpt_airport_id', 5);
$table->string('arr_airport_id', 5);
$table->unsignedInteger('distance')->nullable();
$table->unsignedInteger('planned_distance')->nullable();
$table->unsignedInteger('level')->nullable();
$table->unsignedDecimal('distance')->nullable();
$table->unsignedDecimal('planned_distance')->nullable();
$table->unsignedDecimal('flight_time', 19)->nullable();
$table->unsignedDecimal('planned_flight_time', 19)->nullable();
$table->unsignedDecimal('zfw', 19)->nullable();

View File

@ -61,7 +61,8 @@ class Pirep extends BaseModel
'planned_flight_time' => 'integer',
'level' => 'integer',
'altitude' => 'integer',
'block_fuel' => 'float',
'zfw' => 'float',
'block_fuel' => 'float',
'gross_weight' => 'float',
'landing_rate' => 'float',
'flight_type' => 'integer',
@ -106,7 +107,7 @@ class Pirep extends BaseModel
*/
public function allowedUpdates()
{
if ($this->state === PirepState::CANCELLED) {
if($this->state === PirepState::CANCELLED) {
return false;
}