<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Bridge\Doctrine\Migrations;

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

final class Version20260528171000 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Rattrape la colonne Matomo serveur manquante sur la configuration boutique.';
    }

    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE shop_shop_config ADD COLUMN IF NOT EXISTS matomo_server_url VARCHAR(255) DEFAULT NULL');
    }

    public function down(Schema $schema): void
    {
        // No-op: this column belongs to Version20260528110000 on fresh databases.
    }
}
