osb/database/migrations/2018_08_10_115648_service_add_status.php

38 lines
922 B
PHP
Raw Normal View History

2018-08-11 05:09:41 +00:00
<?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');
});
}
}