Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/schema/PhabricatorConfigSchemaSpec.php
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | $this->buildRawSchema( | ||||
array( | array( | ||||
'PRIMARY' => array( | 'PRIMARY' => array( | ||||
'columns' => array('src', 'type', 'dst'), | 'columns' => array('src', 'type', 'dst'), | ||||
'unique' => true, | 'unique' => true, | ||||
), | ), | ||||
'src' => array( | 'src' => array( | ||||
'columns' => array('src', 'type', 'dateCreated', 'seq'), | 'columns' => array('src', 'type', 'dateCreated', 'seq'), | ||||
), | ), | ||||
'key_dst' => array( | |||||
'columns' => array('dst', 'type', 'src'), | |||||
'unique' => true, | |||||
), | |||||
)); | )); | ||||
$this->buildRawSchema( | $this->buildRawSchema( | ||||
$object->getApplicationName(), | $object->getApplicationName(), | ||||
PhabricatorEdgeConfig::TABLE_NAME_EDGEDATA, | PhabricatorEdgeConfig::TABLE_NAME_EDGEDATA, | ||||
array( | array( | ||||
'id' => 'id', | 'id' => 'id', | ||||
'data' => 'text', | 'data' => 'text', | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | switch ($data_type) { | ||||
$charset = 'binary'; | $charset = 'binary'; | ||||
$collation = 'binary'; | $collation = 'binary'; | ||||
break; | break; | ||||
case 'bytes32': | case 'bytes32': | ||||
$column_type = 'char(32)'; | $column_type = 'char(32)'; | ||||
$charset = 'binary'; | $charset = 'binary'; | ||||
$collation = 'binary'; | $collation = 'binary'; | ||||
break; | break; | ||||
case 'bytes20': | |||||
$column_type = 'char(20)'; | |||||
$charset = 'binary'; | |||||
$collation = 'binary'; | |||||
break; | |||||
case 'bytes12': | case 'bytes12': | ||||
$column_type = 'char(12)'; | $column_type = 'char(12)'; | ||||
$charset = 'binary'; | $charset = 'binary'; | ||||
$collation = 'binary'; | $collation = 'binary'; | ||||
break; | break; | ||||
case 'bytes': | case 'bytes4': | ||||
$column_type = 'longblob'; | $column_type = 'char(4)'; | ||||
$charset = 'binary'; | $charset = 'binary'; | ||||
$collation = 'binary'; | $collation = 'binary'; | ||||
break; | break; | ||||
case 'bytes': | |||||
$column_type = 'longblob'; | |||||
break; | |||||
case 'text255': | case 'text255': | ||||
$column_type = 'varchar(255)'; | $column_type = 'varchar(255)'; | ||||
$charset = $this->getUTF8Charset(); | $charset = $this->getUTF8Charset(); | ||||
$collation = $this->getUTF8Collation(); | $collation = $this->getUTF8Collation(); | ||||
break; | break; | ||||
case 'text128': | case 'text128': | ||||
$column_type = 'varchar(128)'; | $column_type = 'varchar(128)'; | ||||
$charset = $this->getUTF8Charset(); | $charset = $this->getUTF8Charset(); | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |