<?php

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

class Create1554824428SeoContentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(! Schema::hasTable('seo_contents')) {
            Schema::create('seo_contents', function (Blueprint $table) {
                $table->increments('id');
                $table->string('meta_title')->nullable();
                $table->text('meta_keyword')->nullable();
                $table->text('meta_description')->nullable();
                $table->string('header')->nullable();
                $table->string('sub_header')->nullable();
                $table->text('seo_text')->nullable();
                $table->string('slug')->nullable();
                $table->string('code')->nullable();
                
                $table->timestamps();
                $table->softDeletes();

                $table->index(['deleted_at']);
            });
        }
    }

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