<?php

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

class CreateEtiquetasfileirasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('etiquetasfileiras', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('numerobarcode');
            // $table->foreignId('checkin_id');
            $table->foreignId('fileira_id');
            $table->foreignId('usuario_id');
            // $table->foreign('checkin_id')->references('id')->on('checkins');
            $table->foreign('fileira_id')->references('id')->on('filas');
            $table->foreign('usuario_id')->references('id')->on('users');
            $table->softDeletes();
            $table->timestamps();
        });
    }

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


