<?php

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

class AddProductIdToOrderInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('order_info', function (Blueprint $table) {
            $table->integer('product_id')->after('user_id')->comment('产品id');
            $table->integer('schedule_id')->after('user_id')->comment('预约号');
            $table->double('price')->after('user_id')->comment('订单价格');
            $table->double('deposit')->after('user_id')->nullable()->comment('定金');
        });
    }

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