<?php

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

class AlterTableProjetAddBudgetRenouvellement extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('projets', function($table) {
            // On ajoute le champ budget
            $table->enum('budget', ['investissement', 'exploitation'])->nullable(false)->after('code_nomenclature');
            // On ajoute les champs booléen pour savoir si c'est un nouveau marché ou un renouvellement
            $table->boolean('renouvellement_marche')->nullable(true)->after('numero_marche_a_renouveler');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
