addSql("ALTER TABLE contrats_line ALTER type SET DEFAULT 'product'"); $this->addSql("UPDATE contrats_line SET type = 'product' WHERE type IS NULL"); $this->addSql("ALTER TABLE contrats_line ALTER type SET NOT NULL"); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE contrats_line ALTER type DROP DEFAULT'); $this->addSql('ALTER TABLE contrats_line ALTER type DROP NOT NULL'); } }