Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/storage/HeraldRule.php
Show All 30 Lines | final class HeraldRule extends HeraldDAO | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'name' => 'text255', | 'name' => 'text255', | ||||
'contentType' => 'text255', | 'contentType' => 'text255', | ||||
'mustMatchAll' => 'bool', | 'mustMatchAll' => 'bool', | ||||
'configVersion' => 'uint32', | 'configVersion' => 'uint32', | ||||
'ruleType' => 'text255', | 'ruleType' => 'text32', | ||||
epriestley: We control this and it's always short. | |||||
'isDisabled' => 'uint32', | 'isDisabled' => 'uint32', | ||||
'triggerObjectPHID' => 'phid?', | 'triggerObjectPHID' => 'phid?', | ||||
// T6203/NULLABILITY | // T6203/NULLABILITY | ||||
// This should not be nullable. | // This should not be nullable. | ||||
'repetitionPolicy' => 'uint32?', | 'repetitionPolicy' => 'uint32?', | ||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_phid' => null, | 'key_author' => array( | ||||
'phid' => array( | 'columns' => array('authorPHID'), | ||||
'columns' => array('phid'), | |||||
'unique' => true, | |||||
), | ), | ||||
'authorPHID' => array( | 'key_ruletype' => array( | ||||
'columns' => array('authorPHID', 'name'), | |||||
'unique' => true, | |||||
), | |||||
'IDX_RULE_TYPE' => array( | |||||
'columns' => array('ruleType'), | 'columns' => array('ruleType'), | ||||
), | ), | ||||
'key_trigger' => array( | 'key_trigger' => array( | ||||
'columns' => array('triggerObjectPHID'), | 'columns' => array('triggerObjectPHID'), | ||||
), | ), | ||||
Not Done Inline ActionsGeneral cleanup:
epriestley: General cleanup:
- Get the right PHID name.
- Remove each-rule-must-have-a-unique-name-per… | |||||
), | ), | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID(HeraldRulePHIDType::TYPECONST); | return PhabricatorPHID::generateNewPHID(HeraldRulePHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |
We control this and it's always short.