<?php

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

class CreateOrderPackageCommoditySerialNumbersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_package_commodity_serial_numbers', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('order_package_commodity_id')->comment('快递包裹');
            $table->string('serial_number')->unique()->default(null)->comment('序列号');
            $table->timestamps();
        });
    }

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