<?php

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

class AddNewColumnToJobResultsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('job_results', function (Blueprint $table) {
            $table->longText('url')->after('result')->nullable();
            $table->string('job_command_name')->after('url')->nullable();
            $table->longText('job_command')->after('job_command_name')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('job_results', function (Blueprint $table) {
            $table->dropColumn('url');
            $table->dropColumn('job_command_name');
            $table->dropColumn('job_command');
        });
    }
}
