Differential D11377 Diff 27335 src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | if ($dry_run) { | ||||
$prompt = pht('Fix these schema issues?'); | $prompt = pht('Fix these schema issues?'); | ||||
if (!phutil_console_confirm($prompt, $default_no = true)) { | if (!phutil_console_confirm($prompt, $default_no = true)) { | ||||
return 1; | return 1; | ||||
} | } | ||||
} | } | ||||
$console->writeOut( | $console->writeOut( | ||||
"%s\n", | "%s\n", | ||||
pht('Dropping caches, for faster migrations...')); | |||||
$root = dirname(phutil_get_library_root('phabricator')); | |||||
$bin = $root.'/bin/cache'; | |||||
phutil_passthru('%s purge --purge-all', $bin); | |||||
$console->writeOut( | |||||
"%s\n", | |||||
pht('Fixing schema issues...')); | pht('Fixing schema issues...')); | ||||
$conn = $api->getConn(null); | $conn = $api->getConn(null); | ||||
if ($unsafe) { | if ($unsafe) { | ||||
queryfx($conn, 'SET SESSION sql_mode = %s', ''); | queryfx($conn, 'SET SESSION sql_mode = %s', ''); | ||||
} else { | } else { | ||||
queryfx($conn, 'SET SESSION sql_mode = %s', 'STRICT_ALL_TABLES'); | queryfx($conn, 'SET SESSION sql_mode = %s', 'STRICT_ALL_TABLES'); | ||||
▲ Show 20 Lines • Show All 522 Lines • Show Last 20 Lines |