<?php

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

class ChangeCommoditiesAddColumnLengthWidthHeightVolumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('commodities', function (Blueprint $table) {
            $table->decimal('length',11,3)->nullable()->comment('长度');
            $table->decimal('width',11,3)->nullable()->comment('宽度');
            $table->decimal('height',11,3)->nullable()->comment('高度');
            $table->decimal('volumn',11,3)->nullable()->comment('体积');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('commodities', function (Blueprint $table) {
            $table->dropColumn('length');
            $table->dropColumn('width');
            $table->dropColumn('height');
            $table->dropColumn('volumn');
        });
    }
}
