Files
exchange/database/migrations/2018_05_15_075453_create_bookings_table.php
T
2018-05-17 15:13:29 +08:00

49 lines
1.2 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBookingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bookings', function (Blueprint $table) {
$table->increments('id');
$table->string('account_name');
$table->integer('account_num');
$table->string('bank_name');
$table->string('bank_branch');
$table->string('company_name');
$table->string('company_address');
$table->string('bank_address');
$table->string('swift_code');
$table->string('cnap');
$table->string('term');
$table->double('amount');
$table->unsignedInteger('rate_id');
$table->foreign('rate_id')
->references('id')->on('rates')
->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bookings');
}
}