osb/database/migrations/2018_07_28_234942_create_site_details.php

36 lines
691 B
PHP
Raw Normal View History

2018-07-31 04:11:00 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSiteDetails extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('site_details', function (Blueprint $table) {
$table->integer('site_id');
$table->string('key');
$table->json('value');
$table->foreign('site_id')->references('id')->on('ab_setup');
$table->unique(['site_id','key']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2018-08-11 05:09:41 +00:00
Schema::dropIfExists('site_details');
2018-07-31 04:11:00 +00:00
}
}