관리-도구
편집 파일: 2021_03_22_071324_create_setting_translations.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateSettingTranslations extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('setting_translations', function (Blueprint $table) { $table->id(); $table->bigInteger('setting_id')->unsigned(); $table->string('locale'); $table->longText('value'); $table->timestamps(); $table->unique(['setting_id', 'locale']); $table->foreign('setting_id')->references('id')->on('settings')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('setting_translations'); } }