<?php

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

class ServiceAddStatus extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('ab_service', function (Blueprint $table) {
			$table->integer('orderby_id')->unsigned()->nullable();
			$table->string('order_status')->nullable();
			$table->json('order_info')->nullable();
			$table->foreign('orderby_id')->references('id')->on('users');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('ab_service', function (Blueprint $table) {
			$table->dropForeign(['orderby_id']);
			$table->dropColumn('orderby_id');
			$table->dropColumn('order_status');
			$table->dropColumn('order_info');
        });
    }
}