Differential D11234 Diff 27012 src/infrastructure/storage/management/workflow/PhabricatorStorageManagementQuickstartWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementQuickstartWorkflow.php
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | public function execute(PhutilArgumentParser $args) { | ||||
$dump = Filesystem::readFile($tmp); | $dump = Filesystem::readFile($tmp); | ||||
$dump = str_replace( | $dump = str_replace( | ||||
$namespace, | $namespace, | ||||
'{$NAMESPACE}', | '{$NAMESPACE}', | ||||
$dump); | $dump); | ||||
// NOTE: This is a hack. We can not use `binary` for this column, because | // NOTE: This is a hack. We can not use `binary` for these columns, because | ||||
// it is part of a fulltext index. | // they are a part of a fulltext index. | ||||
$old = $dump; | $old = $dump; | ||||
$dump = preg_replace( | $dump = preg_replace( | ||||
'/`corpus` longtext CHARACTER SET .* COLLATE .*,/mi', | '/`corpus` longtext CHARACTER SET .* COLLATE .*,/mi', | ||||
'`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} '. | '`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} '. | ||||
'COLLATE {$COLLATE_FULLTEXT},', | 'COLLATE {$COLLATE_FULLTEXT},', | ||||
$dump); | $dump); | ||||
if ($dump == $old) { | if ($dump == $old) { | ||||
// If we didn't make any changes, yell about it. We'll produce an invalid | // If we didn't make any changes, yell about it. We'll produce an invalid | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |