#32 assign aircraft to subfleets, and aircraft to subfleets
This commit is contained in:
@@ -37,14 +37,6 @@ class CreateFlightsTable extends Migration
|
||||
$table->index('dpt_airport_id');
|
||||
$table->index('arr_airport_id');
|
||||
});
|
||||
|
||||
Schema::create('flight_aircraft', function ($table) {
|
||||
$table->uuid('flight_id');
|
||||
$table->integer('aircraft_id')->unsigned();
|
||||
|
||||
$table->primary(['flight_id', 'aircraft_id']);
|
||||
$table->index(['aircraft_id', 'flight_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,6 +47,5 @@ class CreateFlightsTable extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('flights');
|
||||
Schema::drop('flight_aircraft');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user