Adjust columns in migrations and give lens to strings and custom flight fields #48

This commit is contained in:
Nabeel Shahzad
2017-07-10 18:54:51 -05:00
parent 6f745091de
commit b5dd700044
14 changed files with 73 additions and 32 deletions

View File

@@ -16,15 +16,16 @@ class CreateFlightsTable extends Migration
Schema::create('flights', function (Blueprint $table) {
$table->uuid('id');
$table->integer('airline_id')->unsigned();
$table->text('flight_number');
$table->text('route_code')->nullable();
$table->text('route_leg')->nullable();
$table->string('flight_number', 10);
$table->string('route_code', 5)->nullable();
$table->string('route_leg', 5)->nullable();
$table->integer('dpt_airport_id')->unsigned();
$table->integer('arr_airport_id')->unsigned();
$table->integer('alt_airport_id')->unsigned()->nullable();
$table->text('route')->nullable();
$table->text('dpt_time')->nullable();
$table->text('arr_time')->nullable();
$table->text('dpt_time', 10)->nullable();
$table->text('arr_time', 10)->nullable();
$table->double('flight_time', 19, 2)->unsigned();
$table->text('notes')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
@@ -37,6 +38,13 @@ class CreateFlightsTable extends Migration
$table->index('dpt_airport_id');
$table->index('arr_airport_id');
});
Schema::create('flight_fields', function (Blueprint $table) {
$table->increments('id');
$table->uuid('flight_id');
$table->string('name', 50);
$table->text('value');
});
}
/**