Files
Inventory/migrations/Version20260312210000.php
Matthieu a6139d7090 feat(normalization) : drop structure and productIds JSON columns
- Remove Composant.structure property, getter/setter
- Remove Piece.productIds property, setProductIds()
- Update fixtures to remove dropped columns
- Add migrations to drop both columns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 08:19:54 +01:00

31 lines
809 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Drop the legacy structure JSON column from composants table.
* Data has been migrated to composant_piece_slots, composant_subcomponent_slots, composant_product_slots tables.
*/
final class Version20260312210000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop legacy structure JSON column from composants table';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE composants DROP COLUMN IF EXISTS structure');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE composants ADD COLUMN structure JSON DEFAULT NULL');
}
}