rename flight subfleet join table
This commit is contained in:
@@ -73,6 +73,15 @@ class CreateFlightTables extends Migration
|
||||
|
||||
$table->index('flight_id');
|
||||
});
|
||||
|
||||
Schema::create('flight_subfleet', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedInteger('subfleet_id');
|
||||
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
|
||||
|
||||
$table->index(['subfleet_id', 'flight_id']);
|
||||
$table->index(['flight_id', 'subfleet_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,6 +93,7 @@ class CreateFlightTables extends Migration
|
||||
{
|
||||
Schema::drop('flight_fields');
|
||||
Schema::drop('flight_fare');
|
||||
Schema::drop('flight_subfleet');
|
||||
Schema::drop('flights');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,14 +35,6 @@ class CreateSubfleetTables extends Migration
|
||||
$table->index(['fare_id', 'subfleet_id']);
|
||||
});
|
||||
|
||||
Schema::create('subfleet_flight', function (Blueprint $table) {
|
||||
$table->unsignedInteger('subfleet_id');
|
||||
$table->string('flight_id', 12);
|
||||
|
||||
$table->primary(['subfleet_id', 'flight_id']);
|
||||
$table->index(['flight_id', 'subfleet_id']);
|
||||
});
|
||||
|
||||
Schema::create('subfleet_rank', function (Blueprint $table) {
|
||||
$table->unsignedInteger('rank_id');
|
||||
$table->unsignedInteger('subfleet_id');
|
||||
@@ -63,7 +55,6 @@ class CreateSubfleetTables extends Migration
|
||||
{
|
||||
Schema::dropIfExists('subfleets');
|
||||
Schema::dropIfExists('subfleet_fare');
|
||||
Schema::dropIfExists('subfleet_flight');
|
||||
Schema::dropIfExists('subfleet_rank');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user