Add fixed pilot pay for a flight #487 (#622)

This commit is contained in:
Nabeel S
2020-03-06 11:36:02 -05:00
committed by GitHub
parent 16c977c769
commit 9f3ddd5dbd
8 changed files with 178 additions and 76 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class FlightsAddPilotPay extends Migration
{
/**
* Add a `pilot_pay` column for a fixed amount to pay to a pilot for a flight
*/
public function up()
{
Schema::table('flights', function (Blueprint $table) {
$table->decimal('pilot_pay')
->nullable()
->after('route');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('flights', function (Blueprint $table) {
$table->dropColumn('pilot_pay');
});
}
}