<?php

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

class ChangeColumnTypeTableLogistics extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('logistics', function (Blueprint $table) {
            $table->dropColumn("type");
        });
        Schema::table('logistics', function (Blueprint $table) {
            $table->enum("type",["物流","快递","全部"])->default("快递")->index()->comment("类型");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('logistics', function (Blueprint $table) {
            $table->dropColumn("type");
        });
        Schema::table('logistics', function (Blueprint $table) {
            $table->enum("type",["logistic","express"])->default("express")->comment("类型");
        });
    }
}
