Add MTOW and ZFW to aircraft editor #775 (#805)

Add MTOW and ZFW to aircraft editor #775
This commit is contained in:
Nabeel S
2020-09-03 13:29:24 -04:00
committed by GitHub
parent e99c22b007
commit 50a0b89caa
5 changed files with 88 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Add a `mtow` column for the max takeoff weight
*/
class AircraftAddMtow extends Migration
{
public function up()
{
Schema::table('aircraft', function (Blueprint $table) {
$table->unsignedDecimal('mtow')
->nullable()
->default(0.0)
->after('hex_code');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('aircraft', function (Blueprint $table) {
$table->dropColumn('mtow');
});
}
}