first commit
This commit is contained in:
38
database/migrations/2018_09_20_215730_create_relays_table.php
Executable file
38
database/migrations/2018_09_20_215730_create_relays_table.php
Executable file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateRelaysTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*kartID, driverID, relayStart, fuel, comments
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('relays', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('kart_id')->unsigned();
|
||||
$table->foreign('kart_id')->references('id')->on('karts')->onDelete('no action');
|
||||
$table->integer('pilot_id')->unsigned();
|
||||
$table->foreign('pilot_id')->references('id')->on('pilots')->onDelete('no action');
|
||||
$table->timestamp('relay_start');
|
||||
$table->boolean('fuel');
|
||||
$table->text('comment');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('relays');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user