diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index db07b40851..75ec23ed35 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1310,6 +1310,7 @@ phutil_register_library_map(array( 'PhabricatorChatLogEvent' => 'applications/chatlog/storage/PhabricatorChatLogEvent.php', 'PhabricatorChatLogEventType' => 'applications/chatlog/constants/PhabricatorChatLogEventType.php', 'PhabricatorChatLogQuery' => 'applications/chatlog/query/PhabricatorChatLogQuery.php', + 'PhabricatorChatLogSchemaSpec' => 'applications/chatlog/storage/PhabricatorChatLogSchemaSpec.php', 'PhabricatorCommitBranchesField' => 'applications/repository/customfield/PhabricatorCommitBranchesField.php', 'PhabricatorCommitCustomField' => 'applications/repository/customfield/PhabricatorCommitCustomField.php', 'PhabricatorCommitSearchEngine' => 'applications/audit/query/PhabricatorCommitSearchEngine.php', @@ -1328,6 +1329,7 @@ phutil_register_library_map(array( 'PhabricatorConduitLogQuery' => 'applications/conduit/query/PhabricatorConduitLogQuery.php', 'PhabricatorConduitMethodCallLog' => 'applications/conduit/storage/PhabricatorConduitMethodCallLog.php', 'PhabricatorConduitMethodQuery' => 'applications/conduit/query/PhabricatorConduitMethodQuery.php', + 'PhabricatorConduitSchemaSpec' => 'applications/conduit/storage/PhabricatorConduitSchemaSpec.php', 'PhabricatorConduitSearchEngine' => 'applications/conduit/query/PhabricatorConduitSearchEngine.php', 'PhabricatorConduitTokenController' => 'applications/conduit/controller/PhabricatorConduitTokenController.php', 'PhabricatorConfigAllController' => 'applications/config/controller/PhabricatorConfigAllController.php', @@ -1367,6 +1369,7 @@ phutil_register_library_map(array( 'PhabricatorConfigSchemaQuery' => 'applications/config/schema/PhabricatorConfigSchemaQuery.php', 'PhabricatorConfigSchemaSpec' => 'applications/config/schema/PhabricatorConfigSchemaSpec.php', 'PhabricatorConfigServerSchema' => 'applications/config/schema/PhabricatorConfigServerSchema.php', + 'PhabricatorConfigSettingsSchemaSpec' => 'applications/config/storage/PhabricatorConfigSettingsSchemaSpec.php', 'PhabricatorConfigSource' => 'infrastructure/env/PhabricatorConfigSource.php', 'PhabricatorConfigStackSource' => 'infrastructure/env/PhabricatorConfigStackSource.php', 'PhabricatorConfigStorageSchema' => 'applications/config/schema/PhabricatorConfigStorageSchema.php', @@ -1393,6 +1396,7 @@ phutil_register_library_map(array( 'PhabricatorCountdownListController' => 'applications/countdown/controller/PhabricatorCountdownListController.php', 'PhabricatorCountdownQuery' => 'applications/countdown/query/PhabricatorCountdownQuery.php', 'PhabricatorCountdownRemarkupRule' => 'applications/countdown/remarkup/PhabricatorCountdownRemarkupRule.php', + 'PhabricatorCountdownSchemaSpec' => 'applications/countdown/storage/PhabricatorCountdownSchemaSpec.php', 'PhabricatorCountdownSearchEngine' => 'applications/countdown/query/PhabricatorCountdownSearchEngine.php', 'PhabricatorCountdownView' => 'applications/countdown/view/PhabricatorCountdownView.php', 'PhabricatorCountdownViewController' => 'applications/countdown/controller/PhabricatorCountdownViewController.php', @@ -1438,6 +1442,7 @@ phutil_register_library_map(array( 'PhabricatorDaemonManagementStopWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php', 'PhabricatorDaemonManagementWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementWorkflow.php', 'PhabricatorDaemonReference' => 'infrastructure/daemon/control/PhabricatorDaemonReference.php', + 'PhabricatorDaemonSchemaSpec' => 'applications/daemon/storage/PhabricatorDaemonSchemaSpec.php', 'PhabricatorDaemonTaskGarbageCollector' => 'applications/daemon/garbagecollector/PhabricatorDaemonTaskGarbageCollector.php', 'PhabricatorDaemonsApplication' => 'applications/daemon/application/PhabricatorDaemonsApplication.php', 'PhabricatorDashboard' => 'applications/dashboard/storage/PhabricatorDashboard.php', @@ -4203,6 +4208,7 @@ phutil_register_library_map(array( ), 'PhabricatorChatLogEventType' => 'PhabricatorChatLogConstants', 'PhabricatorChatLogQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'PhabricatorChatLogSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorCommitBranchesField' => 'PhabricatorCommitCustomField', 'PhabricatorCommitCustomField' => 'PhabricatorCustomField', 'PhabricatorCommitSearchEngine' => 'PhabricatorApplicationSearchEngine', @@ -4224,6 +4230,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface', ), 'PhabricatorConduitMethodQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'PhabricatorConduitSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorConduitSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorConduitTokenController' => 'PhabricatorConduitController', 'PhabricatorConfigAllController' => 'PhabricatorConfigController', @@ -4267,6 +4274,7 @@ phutil_register_library_map(array( 'PhabricatorConfigSchemaQuery' => 'Phobject', 'PhabricatorConfigSchemaSpec' => 'Phobject', 'PhabricatorConfigServerSchema' => 'PhabricatorConfigStorageSchema', + 'PhabricatorConfigSettingsSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorConfigStackSource' => 'PhabricatorConfigSource', 'PhabricatorConfigStorageSchema' => 'Phobject', 'PhabricatorConfigTableSchema' => 'PhabricatorConfigStorageSchema', @@ -4294,6 +4302,7 @@ phutil_register_library_map(array( 'PhabricatorCountdownListController' => 'PhabricatorCountdownController', 'PhabricatorCountdownQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorCountdownRemarkupRule' => 'PhabricatorObjectRemarkupRule', + 'PhabricatorCountdownSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorCountdownSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorCountdownView' => 'AphrontTagView', 'PhabricatorCountdownViewController' => 'PhabricatorCountdownController', @@ -4338,6 +4347,7 @@ phutil_register_library_map(array( 'PhabricatorDaemonManagementStatusWorkflow' => 'PhabricatorDaemonManagementWorkflow', 'PhabricatorDaemonManagementStopWorkflow' => 'PhabricatorDaemonManagementWorkflow', 'PhabricatorDaemonManagementWorkflow' => 'PhabricatorManagementWorkflow', + 'PhabricatorDaemonSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorDaemonTaskGarbageCollector' => 'PhabricatorGarbageCollector', 'PhabricatorDaemonsApplication' => 'PhabricatorApplication', 'PhabricatorDashboard' => array( diff --git a/src/applications/chatlog/storage/PhabricatorChatLogChannel.php b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php index 5e3f355a7b..ce6117185a 100644 --- a/src/applications/chatlog/storage/PhabricatorChatLogChannel.php +++ b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php @@ -10,6 +10,21 @@ final class PhabricatorChatLogChannel protected $viewPolicy; protected $editPolicy; + public function getConfiguration() { + return array( + self::CONFIG_COLUMN_SCHEMA => array( + 'serviceName' => 'text64', + 'serviceType' => 'text32', + 'channelName' => 'text64', + ), + self::CONFIG_KEY_SCHEMA => array( + 'key_channel' => array( + 'columns' => array('channelName', 'serviceType', 'serviceName'), + ), + ), + ) + parent::getConfiguration(); + } + public function getCapabilities() { return array( PhabricatorPolicyCapability::CAN_VIEW, diff --git a/src/applications/chatlog/storage/PhabricatorChatLogEvent.php b/src/applications/chatlog/storage/PhabricatorChatLogEvent.php index 1fe4e8bd1e..68c6968f77 100644 --- a/src/applications/chatlog/storage/PhabricatorChatLogEvent.php +++ b/src/applications/chatlog/storage/PhabricatorChatLogEvent.php @@ -16,6 +16,11 @@ final class PhabricatorChatLogEvent public function getConfiguration() { return array( self::CONFIG_TIMESTAMPS => false, + self::CONFIG_COLUMN_SCHEMA => array( + 'author' => 'text64', + 'type' => 'text4', + 'message' => 'text', + ), ) + parent::getConfiguration(); } diff --git a/src/applications/chatlog/storage/PhabricatorChatLogSchemaSpec.php b/src/applications/chatlog/storage/PhabricatorChatLogSchemaSpec.php new file mode 100644 index 0000000000..3c7b436cc1 --- /dev/null +++ b/src/applications/chatlog/storage/PhabricatorChatLogSchemaSpec.php @@ -0,0 +1,9 @@ +buildLiskSchemata('PhabricatorChatLogDAO'); + } + +} diff --git a/src/applications/conduit/storage/PhabricatorConduitCertificateToken.php b/src/applications/conduit/storage/PhabricatorConduitCertificateToken.php index 3f92395670..c324e4fc08 100644 --- a/src/applications/conduit/storage/PhabricatorConduitCertificateToken.php +++ b/src/applications/conduit/storage/PhabricatorConduitCertificateToken.php @@ -5,4 +5,20 @@ final class PhabricatorConduitCertificateToken extends PhabricatorConduitDAO { protected $userPHID; protected $token; + public function getConfiguration() { + return array( + self::CONFIG_COLUMN_SCHEMA => array( + 'token' => 'text64?', + ), + self::CONFIG_KEY_SCHEMA => array( + 'userPHID' => array( + 'columns' => array('userPHID'), + ), + 'token' => array( + 'columns' => array('token'), + ), + ), + ) + parent::getConfiguration(); + } + } diff --git a/src/applications/conduit/storage/PhabricatorConduitConnectionLog.php b/src/applications/conduit/storage/PhabricatorConduitConnectionLog.php index 16699e2d0c..0d47fcf735 100644 --- a/src/applications/conduit/storage/PhabricatorConduitConnectionLog.php +++ b/src/applications/conduit/storage/PhabricatorConduitConnectionLog.php @@ -7,4 +7,15 @@ final class PhabricatorConduitConnectionLog extends PhabricatorConduitDAO { protected $clientDescription; protected $username; + public function getConfiguration() { + return array( + self::CONFIG_COLUMN_SCHEMA => array( + 'client' => 'text255?', + 'clientVersion' => 'text255?', + 'clientDescription' => 'text255?', + 'username' => 'text255?', + ), + ) + parent::getConfiguration(); + } + } diff --git a/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php b/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php index e199ac4bbe..c3be27440b 100644 --- a/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php +++ b/src/applications/conduit/storage/PhabricatorConduitMethodCallLog.php @@ -10,6 +10,19 @@ final class PhabricatorConduitMethodCallLog protected $error; protected $duration; + public function getConfiguration() { + return array( + self::CONFIG_COLUMN_SCHEMA => array( + 'id' => 'id64', + 'connectionID' => 'id64?', + 'method' => 'text255', + 'error' => 'text255', + 'duration' => 'uint64', + 'callerPHID' => 'phid?', + ), + ) + parent::getConfiguration(); + } + /* -( PhabricatorPolicyInterface )----------------------------------------- */ diff --git a/src/applications/conduit/storage/PhabricatorConduitSchemaSpec.php b/src/applications/conduit/storage/PhabricatorConduitSchemaSpec.php new file mode 100644 index 0000000000..8753145db4 --- /dev/null +++ b/src/applications/conduit/storage/PhabricatorConduitSchemaSpec.php @@ -0,0 +1,9 @@ +buildLiskSchemata('PhabricatorConduitDAO'); + } + +} diff --git a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php index f534c0bf26..c5d543ede0 100644 --- a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php +++ b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php @@ -158,6 +158,7 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject { $column_type = 'int(10) unsigned'; break; case 'id64': + case 'uint64': $column_type = 'bigint(20) unsigned'; break; case 'phid': @@ -166,6 +167,11 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject { $charset = 'binary'; $collation = 'binary'; break; + case 'bytes40': + $column_type = 'char(40)'; + $charset = 'binary'; + $collation = 'binary'; + break; case 'bytes12': $column_type = 'char(12)'; $charset = 'binary'; @@ -176,6 +182,11 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject { $charset = 'binary'; $collation = 'binary'; break; + case 'text255': + $column_type = 'varchar(255)'; + $charset = $this->getUTF8Charset(); + $collation = $this->getUTF8Collation(); + break; case 'text128': $column_type = 'varchar(128)'; $charset = $this->getUTF8Charset(); @@ -201,6 +212,16 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject { $charset = $this->getUTF8Charset(); $collation = $this->getUTF8Collation(); break; + case 'text8': + $column_type = 'varchar(8)'; + $charset = $this->getUTF8Charset(); + $collation = $this->getUTF8Collation(); + break; + case 'text4': + $column_type = 'varchar(4)'; + $charset = $this->getUTF8Charset(); + $collation = $this->getUTF8Collation(); + break; case 'text': $column_type = 'longtext'; $charset = $this->getUTF8Charset(); diff --git a/src/applications/config/storage/PhabricatorConfigEntry.php b/src/applications/config/storage/PhabricatorConfigEntry.php index d2e16611bf..823fe50b00 100644 --- a/src/applications/config/storage/PhabricatorConfigEntry.php +++ b/src/applications/config/storage/PhabricatorConfigEntry.php @@ -14,6 +14,16 @@ final class PhabricatorConfigEntry extends PhabricatorConfigEntryDAO self::CONFIG_SERIALIZATION => array( 'value' => self::SERIALIZATION_JSON, ), + self::CONFIG_COLUMN_SCHEMA => array( + 'namespace' => 'text64', + 'configKey' => 'text64', + 'isDeleted' => 'bool', + ), + self::CONFIG_KEY_SCHEMA => array( + 'key_name' => array( + 'columns' => array('namespace', 'configKey'), + ), + ), ) + parent::getConfiguration(); } diff --git a/src/applications/config/storage/PhabricatorConfigSettingsSchemaSpec.php b/src/applications/config/storage/PhabricatorConfigSettingsSchemaSpec.php new file mode 100644 index 0000000000..62ba8d80d9 --- /dev/null +++ b/src/applications/config/storage/PhabricatorConfigSettingsSchemaSpec.php @@ -0,0 +1,11 @@ +buildLiskSchemata('PhabricatorConfigEntryDAO'); + $this->buildTransactionSchema(new PhabricatorConfigTransaction()); + } + +} diff --git a/src/applications/countdown/storage/PhabricatorCountdown.php b/src/applications/countdown/storage/PhabricatorCountdown.php index 47dc8df9e1..21b6db2b22 100644 --- a/src/applications/countdown/storage/PhabricatorCountdown.php +++ b/src/applications/countdown/storage/PhabricatorCountdown.php @@ -27,6 +27,9 @@ final class PhabricatorCountdown public function getConfiguration() { return array( self::CONFIG_AUX_PHID => true, + self::CONFIG_COLUMN_SCHEMA => array( + 'title' => 'text255', + ), ) + parent::getConfiguration(); } diff --git a/src/applications/countdown/storage/PhabricatorCountdownSchemaSpec.php b/src/applications/countdown/storage/PhabricatorCountdownSchemaSpec.php new file mode 100644 index 0000000000..df8a4400a2 --- /dev/null +++ b/src/applications/countdown/storage/PhabricatorCountdownSchemaSpec.php @@ -0,0 +1,10 @@ +buildLiskSchemata('PhabricatorCountdownDAO'); + } + +} diff --git a/src/applications/daemon/storage/PhabricatorDaemonLog.php b/src/applications/daemon/storage/PhabricatorDaemonLog.php index 0077e30680..a4f89c8477 100644 --- a/src/applications/daemon/storage/PhabricatorDaemonLog.php +++ b/src/applications/daemon/storage/PhabricatorDaemonLog.php @@ -24,6 +24,13 @@ final class PhabricatorDaemonLog extends PhabricatorDaemonDAO 'argv' => self::SERIALIZATION_JSON, 'explicitArgv' => self::SERIALIZATION_JSON, ), + self::CONFIG_COLUMN_SCHEMA => array( + 'daemon' => 'text255', + 'host' => 'text255', + 'pid' => 'uint32', + 'envHash' => 'bytes40', + 'status' => 'text8', + ), ) + parent::getConfiguration(); } diff --git a/src/applications/daemon/storage/PhabricatorDaemonLogEvent.php b/src/applications/daemon/storage/PhabricatorDaemonLogEvent.php index 473ca45e33..6be65dd784 100644 --- a/src/applications/daemon/storage/PhabricatorDaemonLogEvent.php +++ b/src/applications/daemon/storage/PhabricatorDaemonLogEvent.php @@ -10,6 +10,10 @@ final class PhabricatorDaemonLogEvent extends PhabricatorDaemonDAO { public function getConfiguration() { return array( self::CONFIG_TIMESTAMPS => false, + self::CONFIG_COLUMN_SCHEMA => array( + 'logType' => 'text4', + 'message' => 'text', + ), ) + parent::getConfiguration(); } diff --git a/src/applications/daemon/storage/PhabricatorDaemonSchemaSpec.php b/src/applications/daemon/storage/PhabricatorDaemonSchemaSpec.php new file mode 100644 index 0000000000..1a987cea22 --- /dev/null +++ b/src/applications/daemon/storage/PhabricatorDaemonSchemaSpec.php @@ -0,0 +1,10 @@ +buildLiskSchemata('PhabricatorDaemonDAO'); + } + +} diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php index c12e3fc027..0e122ba55a 100644 --- a/src/infrastructure/storage/lisk/LiskDAO.php +++ b/src/infrastructure/storage/lisk/LiskDAO.php @@ -1742,6 +1742,7 @@ abstract class LiskDAO { 'phid' => 'phid', 'viewPolicy' => 'policy', 'editPolicy' => 'policy', + 'epoch' => 'epoch', 'dateCreated' => 'epoch', 'dateModified' => 'epoch', );