<?php

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

class ChangeCitiesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //行政区划 一级省 二级市 三级县区 四级乡
        Schema::table('cities', function (Blueprint $table) {
            $table->bigInteger('type')->default(2)->comment('行政级别');
        });
        Schema::table('w_m_s_waybills', function (Blueprint $table) {
            $table->string('ReservedField01')->nullable()->comment('预留字段1');
        });
        Schema::table('waybills', function (Blueprint $table) {
            $table->string('source_bill')->after('waybill_number')->nullable()->comment('上游单号');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

        Schema::table('cities', function (Blueprint $table) {
            $table->dropColumn('type');
        });
        Schema::table('w_m_s_waybills', function (Blueprint $table) {
            $table->dropColumn('ReservedField01');
        });
        Schema::table('waybills', function (Blueprint $table) {
            $table->dropColumn('source_bill');
        });
    }
}
