<?php

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

class CreateConfCaixasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('confcaixas', function (Blueprint $table) {
            $table->id();
            $table->string('tipocaixa')->nullable();
            $table->float('alturacaixam')->nullable();
            $table->float('alturacaixacm')->nullable();
            $table->float('larguracaixam')->nullable();
            $table->float('larguracaixacm')->nullable();
            $table->float('profundidadecaixam')->nullable();
            $table->float('profundidadecaixacm')->nullable();
            $table->foreignId('usuario_id');
            // $table->Text('descricaocaixa')->nullable();
            $table->foreign('usuario_id')->references('id')->on('users');
            $table->softDeletes();
            $table->timestamps();
        });
    }

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