for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRecordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create('records', function (Blueprint $table) {
$table->bigIncrements('id');
$table->foreignId('user_id')->nullable()
->references(user_model()->getKeyName())
->on(user_model()->getTable());
$table->integer('recordable_id');
$table->string('recordable_type');
$table->timestamp('time_from');
$table->timestamp('time_to');
$table->text('comments')->nullable();
$table->timestamps();
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('records');