<?php

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

class AlterTableStructure extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('structures', function($table) {
            $table->string('cp', 5)->nullable()->after('adresse');
            $table->string('ville', 100)->nullable()->after('cp');
            $table->decimal('latitude', 12, 9)->nullable()->after('ville');
            $table->decimal('longitude', 12, 9)->nullable()->after('latitude');
            $table->string('champ_referentiel', 50)->after('longitude');
            $table->boolean('active')->after('champ_referentiel');
        });
    }

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