Files
exchange/database/migrations/2018_06_21_025734_supplier_booking_table.php
T
2018-06-27 10:09:06 +08:00

45 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class SupplierBookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('supplier_bookings', function (Blueprint $table) {
$table->increments('id');
$table->string('payment_method');
$table->double('transfer_amount');
$table->double('rate');
$table->double('rebate');
$table->double('amountInRMB');
$table->double('rmbBankAmount');
$table->integer('book_id')->unsigned();
$table->foreign('book_id')->references('id')->on('bookings');
$table->integer('supplier_id')->unsigned();
$table->foreign('supplier_id')->references('id')->on('setting_suppliers');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('booking_suppliers');
}
}