On MsSQL, Collation used to be enforced to Latin1_General_CS_AS in versions 5.3 and 5.4 (see
Since this change of strategy (ie. in 5.5), whenever the default collation of the database isn't Latin1_General_CS_AS, the default collation is now used (after potential fix to include CS and AS) resulting in the database having columns with different collations.
These collations are potentially incompatible causing error at runtime such as :
The bug occurs only on instances that upgraded from versions 5.3 or 5.4. It does not impact instances that directly upgrade from 5.6 to 6.0 for instance.
- before executing migrations, NVARCHAR columns must be converted to the CS_AS version of db default collation. That fixes the columns badly created in 5.3 and 5.4.
- new NVARCHAR columns must be created with the CS_AS version of db default collation. That allows to support data migrations on these new columns.