<?php

declare(strict_types=1);

namespace DoctrineMigrations;

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

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20260520061736 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'mail_message.message_id: drop global UNIQUE (un même Message-ID existe dans plusieurs dossiers IMAP), conserver un index simple';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('DROP INDEX uniq_6c00b110537a1329');
        $this->addSql('CREATE INDEX idx_mail_message_message_id ON mail_message (message_id)');
    }

    public function down(Schema $schema): void
    {
        $this->addSql('DROP INDEX idx_mail_message_message_id');
        $this->addSql('CREATE UNIQUE INDEX uniq_6c00b110537a1329 ON mail_message (message_id)');
    }
}
