for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Uccello\Core\Database\Migrations\Migration;
use Uccello\Core\Database\Migrations\Traits\TablePrefixTrait;
class CreateUserSettingsTable extends Migration
{
use TablePrefixTrait;
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create($this->tablePrefix . 'user_settings', function (Blueprint $table) {
$table->unsignedInteger('user_id')->primary();
$table->longText('data');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users') ->onDelete('cascade');
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists($this->tablePrefix . 'user_settings');