<?php

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

class CreateTasKdataTable extends Migration
{


    public $set_schema_table = 'taskdata';

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
//      event_date,event_time,event_venue,event_is_paid,event_cost,

//        event_contact_name,event_contact_email,event_contact_tel,
//        event_web,event_twitter,event_facebook,event_other,task-files,
//        event_coverage[],event_coverage[],event_coverage[],event_coverage[]
//        ,event_coverage[],event_interest[],event_interest[],event_interest[],
//        event_interest[],event_interest[],

        Schema::create($this->set_schema_table,function($table){
           $table->increments('id');
            $table->string('title');
            $table->text('description')->nullable();
            $table->date('deadline')->nullable();
            $table->string('email_name')->nullable();
            $table->string('email_surname')->nullable();
            $table->string('email_personalemail')->nullable();
            $table->string('email_deleteemail')->nullable();
            $table->string('web_link')->nullable();
            $table->string('event_date')->nullable();
            $table->string('event_time')->nullable();
            $table->string('event_venue')->nullable();
            $table->boolean('event_is_paid')->nullable();
            $table->string('event_cost')->nullable();
            $table->string('event_contact_name')->nullable();
            $table->string('event_contact_email')->nullable();
            $table->string('event_contact_tel')->nullable();
            $table->text('event_disexp')->nullable();
            $table->text('event_foundation')->nullable();
            $table->string('event_web')->nullable();
            $table->string('event_twitter')->nullable();
            $table->string('event_facebook')->nullable();
            $table->string('event_other')->nullable();
            $table->string('event_coverage')->nullable();
            $table->string('event_interest')->nullable();
            $table->text('event_interviewed')->nullable();
            $table->text('event_participants')->nullable();

            $table->text('event_applicant')->nullable();
            $table->string('formtype')->nullable();


//            $table->integer('status_id')->nullable()->unsigned();

            //string date field fallback
            $table->string('date_string')->nullable();
//            $table->string('venue')->nullable();
//            $table->text('expositor')->nullable();


//            $table->integer('task_id')->nullable()->unsigned();

            $table->timestamps();



//            $table->foreign('status_id')->references('id')->on('status')->onDelete('set null');

//            $table->foreign('task_id')->references('id')->on('tasks')->onDelete('cascade');


        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop($this->set_schema_table);

    }
}
