addSql('ALTER TABLE card_template ADD background_path VARCHAR(255) DEFAULT NULL, ADD fonts JSON DEFAULT NULL'); $this->addSql("UPDATE card_template SET fonts = '[]' WHERE fonts IS NULL"); $this->addSql('ALTER TABLE card_template MODIFY fonts JSON NOT NULL'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE card_template DROP background_path, DROP fonts'); } }