#57 user can save flights

This commit is contained in:
Nabeel Shahzad
2017-08-03 21:02:02 -05:00
parent 9156b40979
commit 9d53c0103f
8 changed files with 149 additions and 7 deletions

View File

@@ -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');
}
}