<?php


declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20260216000100 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Create ingest_profile table';
    }

    public function up(Schema $schema): void
    {
        $table = $schema->createTable('ingest_profile');
        $table->addColumn('id', 'binary', ['length' => 16]);
        $table->addColumn('version', 'integer');
        $table->addColumn('chunk_size', 'integer');
        $table->addColumn('chunk_overlap', 'integer');
        $table->addColumn('embedding_model', 'string', ['length' => 255]);
        $table->addColumn('embedding_dimension', 'integer');
        $table->addColumn('scoring_version', 'integer');
        $table->addColumn('active', 'boolean');
        $table->addColumn('reindex_required', 'boolean');
        $table->addColumn('created_at', 'datetime_immutable');
        $table->setPrimaryKey(['id']);
    }

    public function down(Schema $schema): void
    {
        $schema->dropTable('ingest_profile');
    }
}
