Skip to content
Snippets Groups Projects
Commit f23fbd69 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

(cherry picked from commit d185ea19)
parent 0102c202
Branches
Tags
9 merge requests!2496Issue #3222757 by lauriii, Wim Leers, nod_, rachel_norfolk, itmaybejj,...,!2366Issue #3285105 by Daniel Arend,!2304Issue #3258987: Class "Drupal\Core\Utility\Error" not found in _drupal_error_handler_real() due to bug in PHP 8.1.0-8.1.5,!2148Issue #3270899: Remove Color module from core,!2071Issue #927570: Setting 403 or 404 handler to a page that redirects leads to endless loop,!1975Issue #3269749: losing query params from user to user/login redirect,!1387Draft: Resolve #2511878 "Support enclosure field",!799Issue #3214332: Preview content is broken in Claro.,!558Resolve #3020422 "Toolbar style update"
......@@ -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();
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment