<?php

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

class UpdateOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('orders', function(Blueprint $table) {
           $table->integer('coupon_id')->nullable();
           $table->integer('coupon_code')->nullable();
           $table->integer('extra_month')->default(0);
           $table->integer('discount')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::table('orders', function(Blueprint $table) {
            $table->dropColumn('coupon_id');
            $table->dropColumn('coupon_code');
            $table->dropColumn('extra_month');
            $table->dropColumn('discount');
        });
    }
}
