#32 assign aircraft to subfleets, and aircraft to subfleets

This commit is contained in:
Nabeel Shahzad
2017-06-23 17:33:18 -05:00
parent b9d49a4af9
commit c3e417429a
27 changed files with 113 additions and 158 deletions

View File

@@ -23,14 +23,22 @@ class CreateSubfleetsTable extends Migration
});
Schema::create('subfleet_rank', function(Blueprint $table) {
$table->integer('rank_id')->unsigned()->nullable();
$table->integer('subfleet_id')->unsigned()->nullable();
$table->integer('rank_id')->unsigned();
$table->integer('subfleet_id')->unsigned();
$table->double('acars_pay', 19, 2)->unsigned()->nullable();
$table->double('manual_pay', 19, 2)->unsigned()->nullable();
$table->primary(['rank_id', 'subfleet_id']);
$table->index(['subfleet_id', 'rank_id']);
});
Schema::create('subfleet_flight', function(Blueprint $table) {
$table->integer('subfleet_id')->unsigned();
$table->integer('flight_id')->unsigned();
$table->primary(['subfleet_id', 'flight_id']);
$table->index(['flight_id', 'subfleet_id']);
});
}
/**
@@ -42,5 +50,6 @@ class CreateSubfleetsTable extends Migration
{
Schema::drop('subfleets');
Schema::drop('subfleet_rank');
Schema::drop('subfleet_flight');
}
}