addSql('ALTER TABLE absence_balance ADD acquiring DOUBLE PRECISION DEFAULT 0 NOT NULL'); $this->addSql("UPDATE absence_balance SET acquiring = acquired, acquired = 0 WHERE type = 'cp'"); $this->addSql('ALTER TABLE absence_balance ALTER acquiring DROP DEFAULT'); } public function down(Schema $schema): void { // Fold the in-progress days back into acquired before dropping the column. $this->addSql("UPDATE absence_balance SET acquired = acquired + acquiring WHERE type = 'cp'"); $this->addSql('ALTER TABLE absence_balance DROP acquiring'); } }