<?php

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

class CreateListaautorizacoesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('listaautorizacoes', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('autorizacao_id');
            $table->string('aut');
            $table->timestamps();
            $table->softDeletes();
            $table->foreign('autorizacao_id')->references('id')->on('autorizacoes');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('listaautorizacoes', function(Blueprint $table)
        {
            $table->dropSoftDeletes();
        });
        Schema::dropIfExists('listaautorizacoes');
    }
}
