<?php

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

class CreateScheduleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('schedule', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name');
           
            $table->integer('boattype_id')->unsigned()->index();
            $table->foreign('boattype_id')->references('id')->on('boattype')->onDelete('cascade');

            $table->softDeletes();
            $table->timestamps();
		});
    }

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