<?php

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

class ChangeOwnerReportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('owner_reports', function (Blueprint $table) {
            $table->dropColumn("total");
            $table->integer('to_business_quantity')->default(0)->comment("to b 单量");
            $table->integer('to_customer_quantity')->default(0)->comment("to c 单量");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('owner_reports', function (Blueprint $table) {
            $table->integer('total')->nullable()->comment("结算月总单量");
            $table->dropColumn("to_business_quantity");
            $table->dropColumn("to_customer_quantity");
        });
    }
}
