created logistics contracts migration

This commit is contained in:
2018-12-01 23:17:38 -06:00
parent 4f4f6d94ea
commit 8062d21b82
4 changed files with 98 additions and 39 deletions
@@ -0,0 +1,44 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLogisticsContractsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('logistics_contracts')) {
Schema::create('logistics_contracts', function (Blueprint $table) {
$table->increments('id');
$table->integer('shipper_id')->nullable();
$table->string('shipper_name')->nullable();
$table->integer('accepted_by_id')->nullable();
$table->string('accepted_by_name')->nullable();
$table->integer('start_system_id')->nullable();
$table->string('start_system_name')->nullable();
$table->integer('destination_system_id')->nullable();
$table->string('destination_system_name')->nullable();
$table->decimal('price', 20, 2)->default(0.00);
$table->decimal('collateral', 20, 2)->default(0.00);
$table->boolean('insured')->default('false');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('logistics_contracts');
}
}