<?php

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

class CreateMallShopExpressTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('mall_shop_express', function (Blueprint $table) {
            $table->unsignedBigInteger('shop_id')->index();
            $table->unsignedBigInteger('express_id')->index();
            $table->timestamps();

            $table->primary(['shop_id', 'express_id']);
        });
    }

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

}