<?php

declare(strict_types=1);

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        if (! Schema::hasTable('synonyms')) {
            Schema::create('synonyms', function (Blueprint $table) {
                $table->id('synonym_id');
                $table->morphs('synonymable');
                $table->string('text');
                $table->integer('type');
                $table->timestamps(6);
                $table->softDeletes(precision: 6);
            });
        }
    }
};
