<?php

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

class CreateCalendarEventsTable extends Migration
{
    /*
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {

        /*
         * Table: calendar_events
         */
        Schema::create('calendar_events', function ($table) {
            $table->increments('id');
            $table->integer('company_id')->nullable();
            $table->integer('calendar_id')->nullable();
            $table->string('name', 45)->nullable();
            $table->integer('priority_id')->nullable();
            $table->integer('status_id')->nullable();
            $table->boolean('is_full_day')->nullable();
            $table->dateTime('start_at')->nullable();
            $table->dateTime('end_at')->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

    /*
    * Reverse the migrations.
    *
    * @return void
    */

    public function down()
    {
        Schema::drop('calendar_events');
    }
}