<?php

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

class ChangeOwnerOperationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('owner_price_operations', function (Blueprint $table) {
            $table->string("discount_count")->nullable()->comment("减免数")->change();
            $table->string("total_discount_price")->nullable()->comment("减免总价")->change();
        });
        Schema::table('owner_price_operation_items', function (Blueprint $table) {
            $table->string("discount_price")->nullable()->comment("减免单价")->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('owner_price_operations', function (Blueprint $table) {
            $table->integer("discount_count")->nullable()->comment("减免数")->change();
            $table->decimal("total_discount_price")->nullable()->comment("减免总价")->change();
        });
        Schema::table('owner_price_operation_items', function (Blueprint $table) {
            $table->integer("discount_price")->nullable()->comment("减免单价")->change();
        });
    }
}

