feat(skeleton) : drop skeleton JSON columns from model_types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-12 18:11:14 +01:00
parent 77c5d25cea
commit 5336dfc09d
4 changed files with 36 additions and 76 deletions

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Drop skeleton JSON columns from model_types — data now lives in
* skeleton_piece_requirements, skeleton_product_requirements,
* skeleton_subcomponent_requirements and custom_fields tables.
*/
final class Version20260312180000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop componentSkeleton, pieceSkeleton, productSkeleton JSON columns from model_types';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE model_types DROP COLUMN IF EXISTS componentskeleton');
$this->addSql('ALTER TABLE model_types DROP COLUMN IF EXISTS pieceskeleton');
$this->addSql('ALTER TABLE model_types DROP COLUMN IF EXISTS productskeleton');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE model_types ADD COLUMN IF NOT EXISTS componentskeleton JSON DEFAULT NULL');
$this->addSql('ALTER TABLE model_types ADD COLUMN IF NOT EXISTS pieceskeleton JSON DEFAULT NULL');
$this->addSql('ALTER TABLE model_types ADD COLUMN IF NOT EXISTS productskeleton JSON DEFAULT NULL');
}
}