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 CreateCommentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create('fg_comments', function (Blueprint $table) {
$table->string('id', 150);
$table->string('creatable_id', 150)->index();
$table->string('creatable_type');
$table->string('commentable_id', 150)->index();
$table->string('commentable_type');
$table->text('comment');
$table->timestamps();
// $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('fg_comments');