Add bids table and bid configuration
This commit is contained in:
@@ -58,8 +58,26 @@ class CreateSettingsTable extends Migration
|
||||
'type' => 'boolean',
|
||||
'description' => 'Only allow flights from current location',
|
||||
],
|
||||
[
|
||||
'order' => 11,
|
||||
'name' => 'Disable flights on bid',
|
||||
'group' => 'flights',
|
||||
'key' => 'flights.disable_on_bid',
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'When a flight is bid on, should the flight be shown',
|
||||
],
|
||||
[
|
||||
'order' => 20,
|
||||
'name' => 'Allow multiple bids',
|
||||
'group' => 'pilots',
|
||||
'key' => 'pilots.allow_single_bid',
|
||||
'value' => 'true',
|
||||
'type' => 'boolean',
|
||||
'description' => 'Whether or not someone can bid on multiple flights',
|
||||
],
|
||||
[
|
||||
'order' => 21,
|
||||
'name' => 'Hide Inactive Pilots',
|
||||
'group' => 'pilots',
|
||||
'key' => 'pilots.hide_inactive',
|
||||
|
||||
36
database/migrations/2017_12_12_174519_create_bids_table.php
Normal file
36
database/migrations/2017_12_12_174519_create_bids_table.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user