Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phragment/storage/PhragmentSnapshot.php
<?php | <?php | ||||
final class PhragmentSnapshot extends PhragmentDAO | final class PhragmentSnapshot extends PhragmentDAO | ||||
implements PhabricatorPolicyInterface { | implements PhabricatorPolicyInterface { | ||||
protected $primaryFragmentPHID; | protected $primaryFragmentPHID; | ||||
protected $name; | protected $name; | ||||
private $primaryFragment = self::ATTACHABLE; | private $primaryFragment = self::ATTACHABLE; | ||||
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( | |||||
'name' => 'text255', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_name' => array( | |||||
'columns' => array('primaryFragmentPHID', 'name'), | |||||
'unique' => true, | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhragmentSnapshotPHIDType::TYPECONST); | PhragmentSnapshotPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |