<?php

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

class AddCostToMallGoodsSkusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mall_goods_skus', function (Blueprint $table) {
            $table->decimal('sku_cost', 20, 2)
                ->comment('商品成本价')
                ->after('price')
                ->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mall_goods_skus', function (Blueprint $table) {

        });
    }
}
