more schema adjustments to tighten up column types and constraints

This commit is contained in:
Nabeel Shahzad
2017-06-21 11:40:08 -05:00
parent 8dd29476c0
commit 381a713882
13 changed files with 19 additions and 43 deletions
@@ -17,24 +17,22 @@ class CreateFaresTable extends Migration
$table->increments('id');
$table->string('code');
$table->string('name');
$table->float('price')->default(0.0);
$table->float('cost')->default(0.0);
$table->integer('capacity')->default(0);
$table->decimal('price', 19, 2)->default(0.0);
$table->decimal('cost', 19, 2)->default(0.0);
$table->integer('capacity')->default(0)->unsigned();
$table->string('notes')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->softDeletes();
});
Schema::create('aircraft_fare', function (Blueprint $table) {
$table->increments('id');
$table->integer('aircraft_id');
$table->integer('fare_id');
$table->float('price')->nullable();
$table->float('cost')->nullable();
$table->integer('capacity')->nullable();
$table->integer('aircraft_id')->unsigned();
$table->integer('fare_id')->unsigned();
$table->decimal('price', 19, 2)->nullable();
$table->decimal('cost', 19, 2)->nullable();
$table->integer('capacity')->nullable()->unsigned();
$table->timestamps();
$table->softDeletes();
});
}