<?php

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

class AddDurataToInterventiTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('interventi', function (Blueprint $table) {
            $table->string('referente_telefono', 100)->nullable()->change();
            $table->string('referente_citta', 100)->nullable()->change();
            
            $table->time('intervento_durata')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('interventi', function (Blueprint $table) {
            $table->string('referente_telefono', 30)->change();
            $table->string('referente_citta', 100)->change();
            
            $table->dropColumn('intervento_durata');
        });
    }
}
