schema tightening
This commit is contained in:
parent
c3e417429a
commit
ac37a93641
@ -9,7 +9,7 @@ class CreateAircraftsTable extends Migration
|
||||
{
|
||||
Schema::create('aircraft', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('subfleet_id')->unsigned()->nullable();
|
||||
$table->integer('subfleet_id')->unsigned();
|
||||
$table->string('hex_code')->nullable();
|
||||
$table->string('icao');
|
||||
$table->string('name');
|
||||
|
@ -22,6 +22,14 @@ class CreateSubfleetsTable extends Migration
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
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']);
|
||||
});
|
||||
|
||||
Schema::create('subfleet_rank', function(Blueprint $table) {
|
||||
$table->integer('rank_id')->unsigned();
|
||||
$table->integer('subfleet_id')->unsigned();
|
||||
@ -31,14 +39,6 @@ class CreateSubfleetsTable extends Migration
|
||||
$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']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user