<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('page_contents', function (Blueprint $table) {
            $table->charset = 'utf8mb4';
            $table->collation = 'utf8mb4_unicode_ci';
            $table->id();
            $table->string('page_key');
            $table->longText('data_en')->nullable();
            $table->longText('data_ar')->nullable();
            $table->timestamps();

            $table->unique('page_key', 'page_contents_page_key_unique');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('page_contents');
    }
};
