Changed some PKs to bigInts

This commit is contained in:
Nabeel Shahzad
2017-08-02 10:20:51 -05:00
parent 1953c4dcb5
commit e4dc989ab2
5 changed files with 10 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ class CreateFaresTable extends Migration
public function up()
{
Schema::create('fares', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->string('code', 50);
$table->string('name', 50);
$table->decimal('price', 19, 2)->default(0.0);

View File

@@ -14,7 +14,7 @@ class CreateAirportsTable extends Migration
public function up()
{
Schema::create('airports', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->string('icao', 5)->unique();
$table->string('name', 50);
$table->string('location', 50)->nullable();

View File

@@ -40,7 +40,7 @@ class CreateFlightsTable extends Migration
});
Schema::create('flight_fields', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->uuid('flight_id');
$table->string('name', 50);
$table->text('value');

View File

@@ -14,7 +14,7 @@ class CreateSubfleetsTable extends Migration
public function up()
{
Schema::create('subfleets', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->integer('airline_id')->unsigned()->nullable();
$table->string('name', 50);
$table->string('type', 7);

View File

@@ -43,7 +43,7 @@ class CreatePirepsTable extends Migration
});
Schema::create('pirep_comments', function (Blueprint $table) {
$table->bigIncrements('id')->unsigned();
$table->bigIncrements('id');
$table->uuid('pirep_id');
$table->bigInteger('user_id', false, true);
$table->text('comment');
@@ -61,7 +61,7 @@ class CreatePirepsTable extends Migration
* Financial tables/fields
*/
Schema::create('pirep_expenses', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->uuid('pirep_id');
$table->string('name');
$table->double('value', 19, 2)->nullable();
@@ -70,7 +70,7 @@ class CreatePirepsTable extends Migration
});
Schema::create('pirep_fares', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->uuid('pirep_id');
$table->unsignedBigInteger('fare_id');
$table->double('count', 19, 2)->nullable();
@@ -82,14 +82,14 @@ class CreatePirepsTable extends Migration
* Additional PIREP data
*/
Schema::create('pirep_fields', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->string('name', 50);
$table->integer('required');
$table->timestamps();
});
Schema::create('pirep_field_values', function (Blueprint $table) {
$table->increments('id');
$table->bigIncrements('id');
$table->uuid('pirep_id');
$table->string('name', 50);
$table->text('value');
@@ -108,6 +108,7 @@ 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');