<?php

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

class AddColumnOwnerPriceModelStorage extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('owner_storage_price_models', function (Blueprint $table) {
            $table->bigInteger("time_unit_id")->comment("计时单位");
        });
        Schema::table("owner_price_operations",function (Blueprint $table){
            $table->integer("discount_count")->nullable()->comment("减免数");
        });
        Schema::table("owner_price_operation_items",function (Blueprint $table){
            $table->decimal("discount_price")->nullable()->comment("减免单价");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('owner_storage_price_models', function (Blueprint $table) {
            $table->dropColumn("time_unit_id");
        });
        Schema::table("owner_price_operations",function (Blueprint $table){
            $table->dropColumn("discount_count");
        });
        Schema::table("owner_price_operation_items",function (Blueprint $table){
            $table->dropColumn("discount_price");
        });
    }
}
