osb/database/migrations/2018_07_28_234942_create_site_details.php
2018-08-11 15:21:15 +10:00

36 lines
691 B
PHP

<?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()
{
Schema::dropIfExists('site_details');
}
}