JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "2019_10_20_143522_create_comments_table.php"

Full Path: /home/markqprx/iniasli.pro/migrations/2019_10_20_143522_create_comments_table.php
File size: 993 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('comments')) return;

        Schema::create('comments', function (Blueprint $table) {
            $table->increments('id');
            $table->text('content');
            $table->integer('parent_id')->unsigned()->nullable()->index();
            $table->string('path')->index();
            $table->integer('user_id')->unsigned()->index();
            $table->integer('commentable_id')->unsigned()->index();
            $table->string('commentable_type', 30)->index();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('comments');
    }
}