<?php

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

class ChangeWarehousesTableAddColumnAddressColumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table("warehouses",function (Blueprint $table){
            $table->text("address")->nullable()->comment("仓库地址");
            $table->string("principal")->nullable()->comment('负责人');
            $table->string("phone")->nullable()->comment('电话');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table("warehouses",function (Blueprint $table){
            $table->dropColumn("address");
            $table->dropColumn("principal");
            $table->dropColumn("phone");
        });
    }
}
