Differential D10632 Diff 25529 src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | try { | ||||
'SELECT patch FROM patch_status'); | 'SELECT patch FROM patch_status'); | ||||
return ipull($applied, 'patch'); | return ipull($applied, 'patch'); | ||||
} catch (AphrontQueryException $ex) { | } catch (AphrontQueryException $ex) { | ||||
return null; | return null; | ||||
} | } | ||||
} | } | ||||
public function createDatabase($fragment) { | public function createDatabase($fragment) { | ||||
$info = $this->getCharsetInfo(); | |||||
list($charset, $collate_text, $collate_sort) = $info; | |||||
queryfx( | queryfx( | ||||
$this->getConn(null), | $this->getConn(null), | ||||
'CREATE DATABASE IF NOT EXISTS %T COLLATE utf8_general_ci', | 'CREATE DATABASE IF NOT EXISTS %T COLLATE %Q', | ||||
$this->getDatabaseName($fragment)); | $this->getDatabaseName($fragment), | ||||
$collate_text); | |||||
} | } | ||||
public function createTable($fragment, $table, array $cols) { | public function createTable($fragment, $table, array $cols) { | ||||
queryfx( | queryfx( | ||||
$this->getConn($fragment), | $this->getConn($fragment), | ||||
'CREATE TABLE IF NOT EXISTS %T.%T (%Q) '. | 'CREATE TABLE IF NOT EXISTS %T.%T (%Q) '. | ||||
'ENGINE=InnoDB, COLLATE utf8_general_ci', | 'ENGINE=InnoDB, COLLATE utf8_general_ci', | ||||
$this->getDatabaseName($fragment), | $this->getDatabaseName($fragment), | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |