Add bids table and bid configuration

This commit is contained in:
Nabeel Shahzad
2017-12-12 11:52:24 -06:00
parent de582f617c
commit 1da0901ae3
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBidsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_bids', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id', false, true);
$table->uuid('flight_id');
$table->timestamps();
$table->index('user_id');
$table->index(['user_id', 'flight_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_bids');
}
}