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 CreateThreadsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create('threads', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id');
$table->string('user_type');
$table->unsignedInteger('channel_id');
$table->string('title');
$table->string('slug');
$table->text('body');
$table->unsignedInteger('view_count')->default(0);
$table->timestamps();
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('threads');