Rename UserFlight to UserBid to match functionality

This commit is contained in:
Nabeel Shahzad
2017-12-12 11:49:35 -06:00
parent cc873f1a29
commit de582f617c
19 changed files with 67 additions and 111 deletions

View File

@@ -107,10 +107,10 @@ class CreateUsersTable extends Migration
*/
public function down()
{
Schema::drop('users');
Schema::drop('permission_role');
Schema::drop('permissions');
Schema::drop('role_user');
Schema::drop('roles');
Schema::dropIfExists('users');
Schema::dropIfExists('permission_role');
Schema::dropIfExists('permissions');
Schema::dropIfExists('role_user');
Schema::dropIfExists('roles');
}
}

View File

@@ -27,6 +27,6 @@ class CreatePasswordResetsTable extends Migration
*/
public function down()
{
Schema::drop('password_resets');
Schema::dropIfExists('password_resets');
}
}

View File

@@ -38,6 +38,6 @@ class CreateAirlinesTable extends Migration
*/
public function down()
{
Schema::drop('airlines');
Schema::dropIfExists('airlines');
}
}

View File

@@ -25,6 +25,6 @@ class CreateAircraftsTable extends Migration
public function down()
{
Schema::drop('aircraft');
Schema::dropIfExists('aircraft');
}
}

View File

@@ -33,6 +33,6 @@ class CreateFaresTable extends Migration
*/
public function down()
{
Schema::drop('fares');
Schema::dropIfExists('fares');
}
}

View File

@@ -5,16 +5,9 @@ use Illuminate\Database\Schema\Blueprint;
class CreateAirportsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('airports', function (Blueprint $table) {
// $table->bigIncrements('id');
$table->string('id', 5)->primary();
$table->string('iata', 5)->nullable();
$table->string('icao', 5);
@@ -30,13 +23,8 @@ class CreateAirportsTable extends Migration
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('airports');
Schema::dropIfExists('airports');
}
}

View File

@@ -47,14 +47,6 @@ class CreateFlightsTable extends Migration
$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']);
});
}
/**
@@ -66,6 +58,5 @@ class CreateFlightsTable extends Migration
{
Schema::drop('flights');
Schema::drop('flight_fields');
Schema::drop('user_flights');
}
}

View File

@@ -33,6 +33,6 @@ class CreateRanksTable extends Migration
*/
public function down()
{
Schema::drop('ranks');
Schema::dropIfExists('ranks');
}
}

View File

@@ -71,10 +71,10 @@ class CreateSubfleetsTable extends Migration
*/
public function down()
{
Schema::drop('subfleets');
Schema::drop('subfleet_expenses');
Schema::drop('subfleet_fare');
Schema::drop('subfleet_flight');
Schema::drop('subfleet_rank');
Schema::dropIfExists('subfleets');
Schema::dropIfExists('subfleet_expenses');
Schema::dropIfExists('subfleet_fare');
Schema::dropIfExists('subfleet_flight');
Schema::dropIfExists('subfleet_rank');
}
}

View File

@@ -107,11 +107,11 @@ class CreatePirepsTable extends Migration
*/
public function down()
{
Schema::drop('pireps');
Schema::drop('pirep_comments');
Schema::drop('pirep_expenses');
Schema::drop('pirep_fares');
Schema::drop('pirep_fields');
Schema::drop('pirep_field_values');
Schema::dropIfExists('pireps');
Schema::dropIfExists('pirep_comments');
Schema::dropIfExists('pirep_expenses');
Schema::dropIfExists('pirep_fares');
Schema::dropIfExists('pirep_fields');
Schema::dropIfExists('pirep_field_values');
}
}

View File

@@ -79,6 +79,6 @@ class CreateSettingsTable extends Migration
*/
public function down()
{
Schema::drop('settings');
Schema::dropIfExists('settings');
}
}

View File

@@ -312,7 +312,7 @@ flight_fields:
name: cost index
value: 100
user_flights:
user_bids:
- id: 100
user_id: 1
flight_id: flightid_1