<?php

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

class ChangeIndexOfStationTaskBatchesFieldBatchId extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('station_task_batches', function (Blueprint $table) {
            $table->unique(['batch_id','status'],'s_t_b_unique_batch_id_status');
        });
    }

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