FK
This commit is contained in:
parent
c84c826c3f
commit
19d6cd572d
@ -18,6 +18,17 @@ class BuilderTableCreateAirports extends Migration
|
||||
$table->string('latitude');
|
||||
$table->string('longitude');
|
||||
});
|
||||
|
||||
Schema::connection('germanairlinesva_fleet')->table('aircrafts', function ($table) {
|
||||
$table
|
||||
->foreign('airport_id')
|
||||
->references('id')
|
||||
->on('germanairlinesva_routes.airports');
|
||||
$table
|
||||
->foreign('home_airport_id')
|
||||
->references('id')
|
||||
->on('germanairlinesva_routes.airports');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user