mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 01:32:42 +01:00
e6bfa1bd23
Summary: Ref T11044. This was old Facebook cruft for reading configuration from SMC (and maybe doing some other questionable things). See D183. (See also D175 for discussion of this from 2011.) In modern Phabricator, you can subclass `SiteConfig` to provide dynamic configuration, and we do so in the Phacility cluster. This lets you change any config, and change in response to requests (e.g., for instancing) and is generally more powerful than this mechanism was. This configuration provider theoretically let you roll your own replication or partitioning, but in practice I believe no one ever did, and no one ever could have anyway without more support in the upstream (for migrations, read-after-write, etc). Test Plan: - Grepped for removed option. - Browsed around with clustering off. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11044 Differential Revision: https://secure.phabricator.com/D16911
57 lines
1.9 KiB
PHP
57 lines
1.9 KiB
PHP
<?php
|
|
|
|
final class PhabricatorMySQLConfigOptions
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
public function getName() {
|
|
return pht('MySQL');
|
|
}
|
|
|
|
public function getDescription() {
|
|
return pht('Database configuration.');
|
|
}
|
|
|
|
public function getIcon() {
|
|
return 'fa-database';
|
|
}
|
|
|
|
public function getGroup() {
|
|
return 'core';
|
|
}
|
|
|
|
public function getOptions() {
|
|
return array(
|
|
$this->newOption('mysql.host', 'string', 'localhost')
|
|
->setLocked(true)
|
|
->setDescription(
|
|
pht('MySQL database hostname.'))
|
|
->addExample('localhost', pht('MySQL on this machine'))
|
|
->addExample('db.example.com:3300', pht('Nonstandard port')),
|
|
$this->newOption('mysql.user', 'string', 'root')
|
|
->setLocked(true)
|
|
->setDescription(
|
|
pht('MySQL username to use when connecting to the database.')),
|
|
$this->newOption('mysql.pass', 'string', null)
|
|
->setHidden(true)
|
|
->setDescription(
|
|
pht('MySQL password to use when connecting to the database.')),
|
|
$this->newOption('storage.default-namespace', 'string', 'phabricator')
|
|
->setLocked(true)
|
|
->setSummary(
|
|
pht('The namespace that Phabricator databases should use.'))
|
|
->setDescription(
|
|
pht(
|
|
"Phabricator puts databases in a namespace, which defaults to ".
|
|
"'phabricator' -- for instance, the Differential database is ".
|
|
"named 'phabricator_differential' by default. You can change ".
|
|
"this namespace if you want. Normally, you should not do this ".
|
|
"unless you are developing Phabricator and using namespaces to ".
|
|
"separate multiple sandbox datasets.")),
|
|
$this->newOption('mysql.port', 'string', null)
|
|
->setLocked(true)
|
|
->setDescription(
|
|
pht('MySQL port to use when connecting to the database.')),
|
|
);
|
|
}
|
|
|
|
}
|