<?php

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

class AlterTableProjet extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('projets', function($table) {
            // On ajoute le champ référentiel
            $table->boolean('referentiel')->nullable()->after('ondam');
            // On ajoute le champ "Niveau de priorité"
            $table->unsignedTinyInteger('niveau_priorite')->nullable()->after('referentiel');
            // On ajoute un booleen pour spécifier si un projet est reporté
            $table->boolean('report')->after('risque')->default(false);
        });
    }

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