You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a migration as a followup for commit 82fbafd
In that commit we changed how we store the address change identifiers
and made the columns non-nullable, but forgot to migrate old address
change entries where the `previous_identifier` defaulted to NULL.
$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 " );
0 commit comments