3 use Illuminate\Support\Facades\Schema;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Database\Migrations\Migration;
7 class CreateCommentsTable extends Migration
16 Schema::create('comments', function (Blueprint $table) {
17 $table->increments('id')->unsigned();
18 $table->integer('page_id')->unsigned();
19 $table->longText('text')->nullable();
20 $table->longText('html')->nullable();
21 $table->integer('parent_id')->unsigned()->nullable();
22 $table->integer('created_by')->unsigned();
23 $table->integer('updated_by')->unsigned()->nullable();
24 $table->index(['page_id', 'parent_id']);
30 * Reverse the migrations.
34 public function down()
36 Schema::dropIfExists('comments');