migrations/Version20260107063439.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Add is_repeatable column to std_content_types_components table
  8.  * to support repeatable fields in content types (like gallery blocks)
  9.  */
  10. final class Version20260107063439 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Add is_repeatable column to std_content_types_components for repeatable content type fields';
  15.     }
  16.     public function up(Schema $schema): void
  17.     {
  18.         $this->addSql('ALTER TABLE std_content_types_components ADD is_repeatable TINYINT(1) DEFAULT 0 NOT NULL COMMENT "Flag that indicates if the component is repeatable"');
  19.     }
  20.     public function down(Schema $schema): void
  21.     {
  22.         $this->addSql('ALTER TABLE std_content_types_components DROP is_repeatable');
  23.     }
  24. }