#57 user can save flights
This commit is contained in:
@@ -46,6 +46,15 @@ class CreateFlightsTable extends Migration
|
||||
$table->text('value');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('user_flights', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id', false, true);
|
||||
$table->uuid('flight_id');
|
||||
|
||||
$table->index('user_id');
|
||||
$table->index(['user_id', 'flight_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,5 +66,6 @@ class CreateFlightsTable extends Migration
|
||||
{
|
||||
Schema::drop('flights');
|
||||
Schema::drop('flight_fields');
|
||||
Schema::drop('user_flights');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +168,14 @@ flights:
|
||||
dpt_time: 9AM EST
|
||||
arr_time: 12PM CST
|
||||
route: KJFK KAUS
|
||||
- id: flightid_3
|
||||
airline_id: 1
|
||||
flight_number: 200
|
||||
dpt_airport_id: 2
|
||||
arr_airport_id: 3
|
||||
dpt_time: 9AM EST
|
||||
arr_time: 12PM CST
|
||||
route: KJFK KAUS
|
||||
|
||||
flight_fields:
|
||||
- id: 1
|
||||
@@ -179,6 +187,14 @@ flight_fields:
|
||||
name: cost index
|
||||
value: 100
|
||||
|
||||
user_flights:
|
||||
- id: 100
|
||||
user_id: 1
|
||||
flight_id: flightid_1
|
||||
- id: 101
|
||||
user_id: 1
|
||||
flight_id: flightid_3
|
||||
|
||||
pireps:
|
||||
- id: pirepid_1
|
||||
user_id: 1
|
||||
|
||||
Reference in New Issue
Block a user