<?
php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
/**
* Run the migrations.
* @return void
*/
public function up()
Schema::create('meta_translations', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('meta_id');
$table->string('page');
$table->string('url');
$table->string('domain');
$table->string('locale');
$table->string('meta_title');
$table->string('meta_keyword');
$table->string('meta_description');
$table->string('thumbnail_alt')->nullable();
$table->unique(['locale', 'meta_id']);
$table->foreign('meta_id')
->references('id')
->on('metas')
->onDelete('cascade');
$table->boolean('active_locale')->default(false);
$table->softDeletes();
$table->timestamps();
});
/**
* Reverse the migrations.
* @return void
*/
public function down()
Schema::dropIfExists('meta_translations');
};