Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function up( Schema $schema ): void { |
||
21 | $this->addSql( "UPDATE address_change SET previous_identifier=current_identifier WHERE previous_identifier IS NULL AND current_identifier IS NOT NULL" ); |
||
22 | // We can't use $schema here to modify the columns because `addSQL` appends to the SQL generated by $schema calls. |
||
23 | // We would fail the migration when trying to set a column to non-nullable if it already contains NULL values |
||
24 | $this->addSql( "ALTER TABLE address_change MODIFY current_identifier VARCHAR(36) NOT NULL, MODIFY previous_identifier VARCHAR(36) NOT NULL " ); |
||
25 | } |
||
33 |