Skip to content

Commit 564cae9

Browse files
Berdirweitzman
authored andcommitted
Set maintenance mode to update when running updates (#3606)
1 parent a719fa4 commit 564cae9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Commands/core/UpdateDBCommands.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ public function updateDoOne($module, $number, $dependency_map, &$context)
164164
{
165165
$function = $module . '_update_' . $number;
166166

167+
// Disable config entity overrides.
168+
if (!defined('MAINTENANCE_MODE')) {
169+
define('MAINTENANCE_MODE', 'update');
170+
}
171+
167172
// If this update was aborted in a previous step, or has a dependency that
168173
// was aborted in a previous step, go no further.
169174
if (!empty($context['results']['#abort']) && array_intersect($context['results']['#abort'], array_merge($dependency_map, [$function]))) {
@@ -246,6 +251,11 @@ public function updateDoOnePostUpdate($function, &$context)
246251
{
247252
$ret = [];
248253

254+
// Disable config entity overrides.
255+
if (!defined('MAINTENANCE_MODE')) {
256+
define('MAINTENANCE_MODE', 'update');
257+
}
258+
249259
// If this update was aborted in a previous step, or has a dependency that was
250260
// aborted in a previous step, go no further.
251261
if (!empty($context['results']['#abort'])) {

0 commit comments

Comments
 (0)