<?php

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

class Create1555688383DevelopersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(! Schema::hasTable('developers')) {
            Schema::create('developers', function (Blueprint $table) {
                $table->increments('id');
                $table->string('name')->nullable();
                $table->text('description')->nullable();
                $table->string('logotype_icon')->nullable();
                $table->string('email')->nullable();
                $table->string('phone')->nullable();
                $table->integer('main_page_priority')->nullable()->unsigned();
                $table->integer('developer_page_priority')->nullable()->unsigned();
                $table->date('birthday')->nullable();
                $table->string('meta_title')->nullable();
                $table->string('meta_keywords')->nullable();
                $table->string('meta_description')->nullable();
                $table->string('seo_text')->nullable();
                $table->string('facebook')->nullable();
                $table->string('youtube')->nullable();
                $table->string('site_link')->nullable();
                
                $table->timestamps();
                $table->softDeletes();

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

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