2022-08-11 01:03:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
2024-06-21 07:43:32 +00:00
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2022-08-11 01:03:36 +00:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2024-06-21 07:43:32 +00:00
|
|
|
Schema::create('site_details', function (Blueprint $table)
|
|
|
|
{
|
|
|
|
$table->string('key');
|
|
|
|
$table->string('value');
|
|
|
|
|
|
|
|
$table->integer('site_id')->unsigned();
|
|
|
|
$table->foreign('site_id')->references('id')->on('sites');
|
|
|
|
|
|
|
|
$table->unique(['site_id','key']);
|
2022-08-11 01:03:36 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2024-06-21 07:43:32 +00:00
|
|
|
Schema::dropIfExists('site_details');
|
2022-08-11 01:03:36 +00:00
|
|
|
}
|
|
|
|
};
|