3 final class PhabricatorConfigDatabaseSchema
4 extends PhabricatorConfigStorageSchema
{
8 private $tables = array();
11 public function addTable(PhabricatorConfigTableSchema
$table) {
12 $key = $table->getName();
13 if (isset($this->tables
[$key])) {
15 if ($key == 'application_application') {
16 // NOTE: This is a terrible hack to allow Application subclasses to
17 // extend LiskDAO so we can apply transactions to them.
22 pht('Trying to add duplicate table "%s"!', $key));
24 $this->tables
[$key] = $table;
28 public function getTables() {
32 public function getTable($key) {
33 return idx($this->tables
, $key);
36 protected function getSubschemata() {
37 return $this->getTables();
40 protected function compareToSimilarSchema(
41 PhabricatorConfigStorageSchema
$expect) {
44 if ($this->getAccessDenied()) {
45 $issues[] = self
::ISSUE_ACCESSDENIED
;
47 if ($this->getCharacterSet() != $expect->getCharacterSet()) {
48 $issues[] = self
::ISSUE_CHARSET
;
51 if ($this->getCollation() != $expect->getCollation()) {
52 $issues[] = self
::ISSUE_COLLATION
;
59 public function newEmptyClone() {
61 $clone->tables
= array();
65 public function setCollation($collation) {
66 $this->collation
= $collation;
70 public function getCollation() {
71 return $this->collation
;
74 public function setCharacterSet($character_set) {
75 $this->characterSet
= $character_set;
79 public function getCharacterSet() {
80 return $this->characterSet
;
83 public function setAccessDenied($access_denied) {
84 $this->accessDenied
= $access_denied;
88 public function getAccessDenied() {
89 return $this->accessDenied
;