mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Create new databases with appropriate collation
Summary: Ref T1191. We don't create new databases with appropriate collation yet. Test Plan: Created a new database and saw it issue: ``` >>> [10] <query> CREATE DATABASE IF NOT EXISTS `phabricator2_testo` COLLATE utf8mb4_bin ``` Reviewers: btrahan, hach-que Reviewed By: hach-que Subscribers: epriestley Maniphest Tasks: T1191 Differential Revision: https://secure.phabricator.com/D10632
This commit is contained in:
parent
8fbebce501
commit
3463ce8a51
1 changed files with 6 additions and 2 deletions
|
@ -109,10 +109,14 @@ final class PhabricatorStorageManagementAPI {
|
|||
}
|
||||
|
||||
public function createDatabase($fragment) {
|
||||
$info = $this->getCharsetInfo();
|
||||
list($charset, $collate_text, $collate_sort) = $info;
|
||||
|
||||
queryfx(
|
||||
$this->getConn(null),
|
||||
'CREATE DATABASE IF NOT EXISTS %T COLLATE utf8_general_ci',
|
||||
$this->getDatabaseName($fragment));
|
||||
'CREATE DATABASE IF NOT EXISTS %T COLLATE %Q',
|
||||
$this->getDatabaseName($fragment),
|
||||
$collate_text);
|
||||
}
|
||||
|
||||
public function createTable($fragment, $table, array $cols) {
|
||||
|
|
Loading…
Reference in a new issue