<?php

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

class CreateFixHistoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('break_images', function(Blueprint $table) {
           $table->increments('id');
           $table->string('image')->nullable();
           $table->integer('break_id')->nullable();
           $table->timestamps();
        });

        Schema::table('breaks', function(Blueprint $table) {
           $table->tinyInteger('status')->default(0);
           $table->integer('user_id')->nullable();
           $table->softDeletes();
        });
    }

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

        Schema::table('breaks', function(Blueprint $table) {
            $table->dropColumn('status');
            $table->dropColumn('user_id');
            $table->dropSoftDeletes();
        });
    }
}
