diff --git a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php --- a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php +++ b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php @@ -6,6 +6,7 @@ abstract class PhabricatorLiskDAO extends LiskDAO { private static $namespaceStack = array(); + private $forcedNamespace; const ATTACHABLE = ''; const CONFIG_APPLICATION_SERIALIZERS = 'phabricator/serializers'; @@ -47,6 +48,11 @@ return $namespace; } + public function setForcedStorageNamespace($namespace) { + $this->forcedNamespace = $namespace; + return $this; + } + /** * @task config */ @@ -188,7 +194,13 @@ abstract public function getApplicationName(); protected function getDatabaseName() { - return self::getStorageNamespace().'_'.$this->getApplicationName(); + if ($this->forcedNamespace) { + $namespace = $this->forcedNamespace; + } else { + $namespace = self::getStorageNamespace(); + } + + return $namespace.'_'.$this->getApplicationName(); } /**