Add load_factor and load_factor_variance to flights #352 (#620)

This commit is contained in:
Nabeel S
2020-03-05 20:19:12 -05:00
committed by GitHub
parent 9ed2e3f9f4
commit 16c977c769
25 changed files with 290 additions and 120 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class FlightsAddLoadFactor extends Migration
{
/**
* Add a `load_factor` and `load_factor_variance` columns to the expenses table
*/
public function up()
{
Schema::table('flights', function (Blueprint $table) {
$table->decimal('load_factor', 5, 2)
->nullable()
->after('flight_type');
$table->decimal('load_factor_variance', 5, 2)
->nullable()
->after('load_factor');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('flights', function (Blueprint $table) {
$table->dropColumn('load_factor');
$table->dropColumn('load_factor_variance');
});
}
}