<?php

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

class PendingExtensions extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('pending_reports', function (Blueprint $table) {

            $table->ipAddress('destination')->nullable();
            $table->timestamp('started_at')->nullable();
            $table->timestamp('finished_at')->nullable();

            $table->dropColumn('path');
        });
    }

    public function down() {
        Schema::table('pending_reports', function (Blueprint $table) {

            $table->dropColumn('destination');
            $table->dropColumn('started_at');
            $table->dropColumn('finished_at');

            $table->string('path');
        });
    }
}
