Commit d185ea19 authored by catch's avatar catch
Browse files

Issue #3265802 by daffie, alexpott: user_update_9301() causes data loss and a...

Issue #3265802 by daffie, alexpott: user_update_9301() causes data loss and a broken site on SQL Server
parent 9d5f1c16
......@@ -109,6 +109,10 @@ function user_update_9301(&$sandbox) {
}
$connection = \Drupal::database();
if ($connection->databaseType() === 'sqlsrv') {
return t('The Microsoft SQL Server does not support user_update_9301() because it causes data loss.');
}
$connection->schema()->dropPrimaryKey('users');
if ($connection->databaseType() === 'mysql') {
$sql_mode = $connection->query("SELECT @@sql_mode;")->fetchField();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment