<?php

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

return new class extends Migration {

    public function up()
    {
        Schema::table('orders', function (Blueprint $table) {
            $table->string('agency_id',50)->nullable()->comment('分公司id');
        });

        Schema::table('partner_offline_orders', function (Blueprint $table) {
            $table->string('agency_id',50)->nullable()->comment('分公司id');
        });

    }

    public function down()
    {
        Schema::table('partner_offline_orders', function (Blueprint $table) {
            $table->dropColumn('agency_id');
        });

        Schema::table('orders', function (Blueprint $table) {
            $table->dropColumn('agency_id');
        });
    }
};