<?php

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

class AddFeedbackRequestedColumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('task_feedback') && !Schema::hasColumn('task_feedback', 'reminder_sent')) {
            Schema::table('task_feedback', function (Blueprint $table) {
                $table->tinyInteger('reminder_sent')->default(1);
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('task_feedback', function (Blueprint $table) {
            //
        });
    }
}
