#32 subfleet classificiation scaffolding
This commit is contained in:
@@ -14,8 +14,10 @@ class CreateAircraftsTable extends Migration
|
||||
$table->string('name');
|
||||
$table->string('registration')->nullable();
|
||||
$table->string('tail_number')->nullable();
|
||||
$table->string('cargo_capacity')->nullable();
|
||||
$table->string('fuel_capacity')->nullable();
|
||||
$table->double('cargo_capacity', 19, 2)->nullable();
|
||||
$table->double('fuel_capacity', 19, 2)->nullable();
|
||||
$table->double('gross_weight', 19, 2)->nullable();
|
||||
$table->tinyInteger('fuel_type')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
|
||||
@@ -23,20 +25,10 @@ class CreateAircraftsTable extends Migration
|
||||
$table->unique('registration');
|
||||
});
|
||||
|
||||
Schema::create('aircraft_classes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code');
|
||||
$table->string('name');
|
||||
$table->string('notes')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('code');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('aircraft');
|
||||
Schema::drop('aircraft_classes');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,6 @@ class CreateRanksTable extends Migration
|
||||
|
||||
$table->unique('name');
|
||||
});
|
||||
|
||||
Schema::create('aircraft_rank', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('aircraft_id')->unsigned();
|
||||
$table->integer('rank_id')->unsigned();
|
||||
$table->double('acars_pay', 19, 2)->default(0.0)->unsigned();
|
||||
$table->double('manual_pay', 19, 2)->default(0.0)->unsigned();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,6 +34,5 @@ class CreateRanksTable extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('ranks');
|
||||
Schema::drop('aircraft_rank');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateSubfleetsTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('subfleets', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('airline_id')->unsigned()->nullable();
|
||||
$table->string('name');
|
||||
$table->text('type');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::create('subfleet_rank', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('subfleet_id')->unsigned()->nullable();
|
||||
$table->integer('rank_id')->unsigned()->nullable();
|
||||
$table->double('acars_pay', 19, 2)->unsigned()->nullable();
|
||||
$table->double('manual_pay', 19, 2)->unsigned()->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('subfleets');
|
||||
Schema::drop('subfleet_rank');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user