
<?php

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

class CreateCotxeAutoritzatTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cotxe_autoritzat', function (Blueprint $table) {
            $table->increments('id');
            $table->string('matricula');
            $table->string('marca')->nullable();
            $table->string('model')->nullable();
            $table->timestamp('data_alta');
            $table->index('data_alta');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('cotxe_autoritzat');
    }
}