<?php

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

class CreateMallShopReasonsTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('mall_shop_reasons', function (Blueprint $table) {
            $table->unsignedBigInteger('shop_id')->index();
            $table->unsignedBigInteger('reason_id')->index();
            $table->timestamps();
            $table->primary(['shop_id', 'reason_id']);
        });
    }

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

}
