<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260310104911 extends AbstractMigration
{
public function getDescription(): string
{
return 'Remove the unique constraint (sku_shop) on product table that enforced unique SKU per shop';
}
public function up(Schema $schema): void
{
$this->addSql('DROP INDEX sku_shop ON product');
}
public function down(Schema $schema): void
{
$this->addSql('CREATE UNIQUE INDEX sku_shop ON product (shop_id, sku)');
}
}