Debug info: SQLState: 42000<br>
Error Code: 448<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid collation 'SQL_Latin1_General_CP1_CS_AI'.<br>
Error Code: 448<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid collation 'SQL_Latin1_General_CP1_CS_AI'.<br>
SELECT id FROM mdl_user WHERE LEN(password) = 32 AND password COLLATE SQL_Latin1_General_CP1_CS_AI NOT LIKE N'$2y$%' ESCAPE '\'
[array (
0 => '$2y$%',
)]
Error code: dmlreadexception
[array (
0 => '$2y$%',
)]
Error code: dmlreadexception
The SQL db was created with the default collation, SQL_Latin1_General_CP1_CI_AS. I realize that isn't the recommendation but it has been working for the entirety of the 3.X lifecycle and with the upgrade to 4.x.
The upgrade code generates a sql string that takes the existing collation and "flips" the CI with CS and AS with AI, found in (sqlsrv_native_moodle_database.php -> sqllike), and the resulting collation (SQL_Latin1_General_CP1_CS_AI) does not exist. Hence the error above. The most similar is "Latin1_General_CS_AI".
I was able to comment out this step in the upgrade process, since none of my users besides the default admin account have hashed passwords, and finished the upgrade. It seems like the upgrade code should not be trying to set a collation that does not exist in the database (?).
I did try to change the collation on the database and it got messy really quick. I would like to avoid it if possible.
Thanks in advance,
David