<?php

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

class CreateLandingDescriptionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('landing_descriptions', function (Blueprint $table) {
            $table->id();
            $table->string('banner_description', 700);
//            $table->string('sec_2_title', 50);
            $table->string('sec_2_description', 700);
            $table->string('sec_3_box_1_description', 200);
            $table->string('sec_3_box_2_description', 200);
            $table->string('sec_3_box_3_description', 200);
            $table->string('sec_3_box_4_description', 200);
            $table->string('sec_3_title', 50);
            $table->string('sec_3_description', 1400);
            $table->string('sec_4_title', 50);
            $table->string('sec_4_description', 110);
            $table->string('sec_4_box_1_description', 55);
            $table->string('sec_4_box_2_description', 55);
            $table->string('sec_4_box_3_description', 55);
            $table->string('sec_4_box_4_description', 55);
            $table->string('sec_5_description', 250);

            $table->unsignedBigInteger('landing_id')->index();
            $table->unsignedBigInteger('language_id')->index();

            $table->foreign('landing_id')->references('id')->on('landings')->onDelete('cascade');

            $table->engine = 'InnoDB';
        });
    }

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