addSql('ALTER TABLE tenant_insurances CHANGE franchise_rials franchise_percent NUMERIC(5, 2) NOT NULL'); $this->addSql('UPDATE tenant_insurances SET franchise_percent = 0'); $this->addSql('ALTER TABLE tenant_service_coverage CHANGE franchise_rials franchise_percent NUMERIC(5, 2) DEFAULT NULL'); $this->addSql('UPDATE tenant_service_coverage SET franchise_percent = NULL'); } public function down(Schema $schema): void { // The rial amounts are gone for good; down() restores the shape, not the data. $this->addSql('ALTER TABLE tenant_insurances CHANGE franchise_percent franchise_rials INT DEFAULT 0 NOT NULL'); $this->addSql('UPDATE tenant_insurances SET franchise_rials = 0'); $this->addSql('ALTER TABLE tenant_service_coverage CHANGE franchise_percent franchise_rials INT DEFAULT NULL'); $this->addSql('UPDATE tenant_service_coverage SET franchise_rials = NULL'); } }