osb/database/migrations/0051-create_site_details.php

37 lines
705 B
PHP
Raw Permalink Normal View History

<?php
use Illuminate\Database\Schema\Blueprint;
2024-06-21 07:43:32 +00:00
use Illuminate\Database\Migrations\Migration;
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']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2024-06-21 07:43:32 +00:00
Schema::dropIfExists('site_details');
}
};