<?php

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

class CreateLearningProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('learning_products', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('parent_id')->nullable();
            $table->boolean('published')->default(0);
            $table->string('title')->nullable();
            $table->string('code')->nullable();
            $table->string('video')->nullable();
            $table->string('lead_time')->nullable();
            $table->string('seo_title')->nullable();
            $table->string('meta_description')->nullable();
            $table->string('url')->nullable();
            $table->longText('short_description')->nullable();
            $table->longText('learning_goals')->nullable();
            $table->longText('review')->nullable();
            $table->longText('certification')->nullable();
            $table->longText('extra_information')->nullable();
            $table->longText('target_audience')->nullable();
            $table->boolean('in_the_picture')->nullable()->default(false);
            $table->dateTime('in_the_picture_start', 0)->nullable();
            $table->dateTime('in_the_picture_end', 0)->nullable();
            $table->string('owner')->nullable();
            $table->string('partner')->nullable();
            $table->string('supplier')->nullable();
            $table->longText('contract_agreements')->nullable();
            $table->string('prognosis_members')->nullable();
            $table->string('prognosis_attendees')->nullable();
            $table->string('sharepoint_link')->nullable();
            $table->string('support_link')->nullable();
            $table->string('support_tickets_link')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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