<?php

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

class CreateQueueUnitsReturningTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('queue_units_returning', function (Blueprint $table) {
            $table->unsignedInteger('dominion_id');
            $table->string('unit_type');
            $table->integer('amount');
            $table->integer('hours');
            $table->timestamps();

            $table->foreign('dominion_id')->references('id')->on('dominions');

            $table->primary(['dominion_id', 'unit_type', 'hours']);
        });
    }

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

Add migration to create queue_units_returning table
Add migration to create queue_units_returning table
