2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_almanac` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_binding` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`servicePHID` varbinary(64) NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`interfacePHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_service` (`servicePHID`,`interfacePHID`),
|
|
|
|
KEY `key_device` (`devicePHID`),
|
|
|
|
KEY `key_interface` (`interfacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_bindingtransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_device` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isBoundToClusterService` tinyint(1) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_name` (`nameIndex`),
|
|
|
|
KEY `key_nametext` (`name`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_devicename_ngrams` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_devicetransaction` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_interface` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`networkPHID` varbinary(64) NOT NULL,
|
|
|
|
`address` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`port` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_unique` (`devicePHID`,`networkPHID`,`address`,`port`),
|
|
|
|
KEY `key_location` (`networkPHID`,`address`,`port`),
|
|
|
|
KEY `key_device` (`devicePHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_interfacetransaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_namespace` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_nameindex` (`nameIndex`),
|
|
|
|
KEY `key_name` (`name`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_namespacename_ngrams` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_namespacetransaction` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2017-04-23 15:24:01 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_network` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_name` (`name`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_networkname_ngrams` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_networktransaction` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_property` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldName` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_service` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`serviceType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_name` (`nameIndex`),
|
|
|
|
KEY `key_nametext` (`name`),
|
|
|
|
KEY `key_servicetype` (`serviceType`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_servicename_ngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_servicetransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
2015-01-23 01:10:26 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2015-01-23 01:10:26 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_application` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_application`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `application_application` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_application`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `application_applicationtransaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_application`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_application`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_audit` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_audit`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `audit_transaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_audit`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `audit_transaction_comment` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`commitPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`pathID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isNewFile` tinyint(1) NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
|
|
|
`fixedState` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`hasReplies` tinyint(1) NOT NULL,
|
|
|
|
`replyToCommentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`legacyCommentID` int(10) unsigned DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
KEY `key_path` (`pathID`),
|
|
|
|
KEY `key_draft` (`authorPHID`,`transactionPHID`),
|
|
|
|
KEY `key_commit` (`commitPHID`),
|
|
|
|
KEY `key_legacy` (`legacyCommentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_auth` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_challenge` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`factorPHID` varbinary(64) NOT NULL,
|
|
|
|
`sessionPHID` varbinary(64) NOT NULL,
|
|
|
|
`challengeKey` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`challengeTTL` int(10) unsigned NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`workflowKey` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`responseDigest` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`responseTTL` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isCompleted` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_issued` (`userPHID`,`challengeTTL`),
|
|
|
|
KEY `key_collection` (`challengeTTL`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_contactnumber` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`contactNumber` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`uniqueKey` binary(12) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isPrimary` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_unique` (`uniqueKey`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `auth_contactnumbertransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_factorconfig` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`factorName` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`factorSecret` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`factorProviderPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_user` (`userPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_factorprovider` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`providerFactorKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_factorprovidertransaction` (
|
2015-01-23 01:10:26 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `auth_hmackey` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`keyName` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyValue` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_name` (`keyName`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_message` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`messageKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`messageText` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_type` (`messageKey`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `auth_messagetransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_password` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`passwordType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`passwordHash` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isRevoked` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`passwordSalt` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`legacyDigestFormat` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_role` (`objectPHID`,`passwordType`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `auth_passwordtransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_providerconfig` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`providerClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerDomain` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isEnabled` tinyint(1) NOT NULL,
|
|
|
|
`shouldAllowLogin` tinyint(1) NOT NULL,
|
|
|
|
`shouldAllowRegistration` tinyint(1) NOT NULL,
|
|
|
|
`shouldAllowLink` tinyint(1) NOT NULL,
|
|
|
|
`shouldAllowUnlink` tinyint(1) NOT NULL,
|
|
|
|
`shouldTrustEmails` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`shouldAutoLogin` tinyint(1) NOT NULL DEFAULT '0',
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_provider` (`providerType`,`providerDomain`),
|
|
|
|
KEY `key_class` (`providerClass`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_providerconfigtransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_sshkey` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyType` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyBody` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyComment` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`keyIndex` binary(12) NOT NULL,
|
|
|
|
`isTrusted` tinyint(1) NOT NULL,
|
|
|
|
`isActive` tinyint(1) DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_activeunique` (`keyIndex`,`isActive`),
|
|
|
|
KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_active` (`isActive`,`objectPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_sshkeytransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `auth_temporarytoken` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`tokenResource` varbinary(64) NOT NULL,
|
|
|
|
`tokenType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`tokenExpires` int(10) unsigned NOT NULL,
|
|
|
|
`tokenCode` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_token` (`tokenResource`,`tokenType`,`tokenCode`),
|
|
|
|
KEY `key_expires` (`tokenExpires`),
|
|
|
|
KEY `key_user` (`userPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_badges` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_award` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`badgePHID` varbinary(64) NOT NULL,
|
|
|
|
`recipientPHID` varbinary(64) NOT NULL,
|
|
|
|
`awarderPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_badge` (`badgePHID`,`recipientPHID`),
|
|
|
|
KEY `key_recipient` (`recipientPHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_badge` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`flavor` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`icon` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`quality` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_creator` (`creatorPHID`,`dateModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_badgename_ngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_transaction` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_transaction_comment` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-06-24 23:15:35 +02:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2016-06-24 23:15:35 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_cache` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_cache`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `cache_general` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`cacheKeyHash` binary(12) NOT NULL,
|
|
|
|
`cacheKey` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheFormat` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheData` longblob NOT NULL,
|
|
|
|
`cacheCreated` int(10) unsigned NOT NULL,
|
|
|
|
`cacheExpires` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_cacheKeyHash` (`cacheKeyHash`),
|
|
|
|
KEY `key_cacheCreated` (`cacheCreated`),
|
|
|
|
KEY `key_ttl` (`cacheExpires`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_cache`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `cache_markupcache` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`cacheKey` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheData` longblob NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `cacheKey` (`cacheKey`),
|
|
|
|
KEY `dateCreated` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_calendar` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_event` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`hostPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isCancelled` tinyint(1) NOT NULL,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`isAllDay` tinyint(1) NOT NULL,
|
|
|
|
`icon` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isRecurring` tinyint(1) NOT NULL,
|
|
|
|
`instanceOfEventPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`sequenceIndex` int(10) unsigned DEFAULT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`isStub` tinyint(1) NOT NULL,
|
|
|
|
`utcInitialEpoch` int(10) unsigned NOT NULL,
|
|
|
|
`utcUntilEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`utcInstanceEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`importAuthorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`importSourcePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`importUIDIndex` binary(12) DEFAULT NULL,
|
|
|
|
`importUID` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`seriesParentPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_instance` (`instanceOfEventPHID`,`sequenceIndex`),
|
|
|
|
UNIQUE KEY `key_rdate` (`instanceOfEventPHID`,`utcInstanceEpoch`),
|
|
|
|
KEY `key_epoch` (`utcInitialEpoch`,`utcUntilEpoch`),
|
|
|
|
KEY `key_series` (`seriesParentPHID`,`utcInitialEpoch`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_event_fdocument` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_event_ffield` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_event_fngrams` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_event_fngrams_common` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventinvitee` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`eventPHID` varbinary(64) NOT NULL,
|
|
|
|
`inviteePHID` varbinary(64) NOT NULL,
|
|
|
|
`inviterPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`availability` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_event` (`eventPHID`,`inviteePHID`),
|
|
|
|
KEY `key_invitee` (`inviteePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventtransaction` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventtransaction_comment` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2017-04-23 15:24:01 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_export` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`policyMode` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`queryKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`secretKey` binary(20) NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_secret` (`secretKey`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_author` (`authorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_exporttransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_externalinvitee` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
`uri` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sourcePHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_name` (`nameIndex`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_import` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`engineType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`triggerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`triggerFrequency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_author` (`authorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_importlog` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`importPHID` varbinary(64) NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_import` (`importPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_importtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_notification` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`eventPHID` varbinary(64) NOT NULL,
|
|
|
|
`utcInitialEpoch` int(10) unsigned NOT NULL,
|
|
|
|
`targetPHID` varbinary(64) NOT NULL,
|
|
|
|
`didNotifyEpoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_notify` (`eventPHID`,`utcInitialEpoch`,`targetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`type` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dst` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2013-01-17 01:42:41 +01:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_conduit` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_conduit`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conduit_certificatetoken` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`token` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `userPHID` (`userPHID`),
|
|
|
|
UNIQUE KEY `token` (`token`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conduit`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conduit_methodcalllog` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`connectionID` bigint(20) unsigned DEFAULT NULL,
|
|
|
|
`method` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`error` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`duration` bigint(20) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`callerPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_method` (`method`),
|
|
|
|
KEY `key_callermethod` (`callerPHID`,`method`),
|
|
|
|
KEY `key_date` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conduit`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conduit_token` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`token` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`expires` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_token` (`token`),
|
|
|
|
KEY `key_object` (`objectPHID`,`tokenType`),
|
|
|
|
KEY `key_expires` (`expires`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_config` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_config`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `config_entry` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`namespace` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`configKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`value` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_name` (`namespace`,`configKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_config`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `config_manualactivity` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`activityType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_type` (`activityType`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_config`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `config_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_conpherence` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_index` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`threadPHID` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) NOT NULL,
|
|
|
|
`previousTransactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} COLLATE {$COLLATE_FULLTEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_transaction` (`transactionPHID`),
|
|
|
|
UNIQUE KEY `key_previous` (`previousTransactionPHID`),
|
|
|
|
KEY `key_thread` (`threadPHID`),
|
|
|
|
FULLTEXT KEY `key_corpus` (`corpus`)
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_participant` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`participantPHID` varbinary(64) NOT NULL,
|
|
|
|
`conpherencePHID` varbinary(64) NOT NULL,
|
|
|
|
`seenMessageCount` bigint(20) unsigned NOT NULL,
|
|
|
|
`settings` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `conpherencePHID` (`conpherencePHID`,`participantPHID`),
|
|
|
|
KEY `key_thread` (`participantPHID`,`conpherencePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_thread` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`messageCount` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`joinPolicy` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` varchar(20) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`topic` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_threadtitle_ngrams` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_transaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `conpherence_transaction_comment` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`conpherencePHID` varbinary(64) DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`conpherencePHID`,`transactionPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_countdown` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `countdown` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_epoch` (`epoch`),
|
|
|
|
KEY `key_author` (`authorPHID`,`epoch`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `countdown_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `countdown_transaction_comment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`type` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dst` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_daemon` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_daemon`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `daemon_locklog` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`lockName` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lockReleased` int(10) unsigned DEFAULT NULL,
|
|
|
|
`lockParameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lockContext` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_lock` (`lockName`),
|
|
|
|
KEY `key_created` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_daemon`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `daemon_log` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`daemon` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`host` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`pid` int(10) unsigned NOT NULL,
|
|
|
|
`argv` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`explicitArgv` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(8) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`runningAsUser` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`daemonID` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_daemonID` (`daemonID`),
|
|
|
|
KEY `status` (`status`),
|
|
|
|
KEY `key_modified` (`dateModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_daemon`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `daemon_logevent` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`logID` int(10) unsigned NOT NULL,
|
|
|
|
`logType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`message` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `logID` (`logID`,`epoch`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_dashboard` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`layoutConfig` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`icon` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_dashboard_fdocument` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_dashboard_ffield` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_dashboard_fngrams` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_dashboard_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_panel` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`panelType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isArchived` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_panel_fdocument` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `dashboard_panel_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `dashboard_panel_fngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_panel_fngrams_common` (
|
2015-01-23 01:10:26 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2015-01-23 01:10:26 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_paneltransaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_portal` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-09-29 22:27:33 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_portal_fdocument` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_portal_ffield` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `dashboard_portal_fngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_portal_fngrams_common` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_portaltransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2016-06-24 23:15:35 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_transaction` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_differential` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_affectedpath` (
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`revisionID` int(10) unsigned NOT NULL,
|
|
|
|
KEY `repositoryID` (`repositoryID`,`pathID`,`epoch`),
|
|
|
|
KEY `revisionID` (`revisionID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_changeset` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`diffID` int(10) unsigned NOT NULL,
|
|
|
|
`oldFile` longblob,
|
|
|
|
`filename` longblob NOT NULL,
|
|
|
|
`awayPaths` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`changeType` int(10) unsigned NOT NULL,
|
|
|
|
`fileType` int(10) unsigned NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`oldProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`newProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`addLines` int(10) unsigned NOT NULL,
|
|
|
|
`delLines` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `diffID` (`diffID`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_changeset_parse_cache` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
|
`cache` longblob NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `dateCreated` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_commit` (
|
|
|
|
`revisionID` int(10) unsigned NOT NULL,
|
|
|
|
`commitPHID` varbinary(64) NOT NULL,
|
|
|
|
PRIMARY KEY (`revisionID`,`commitPHID`),
|
|
|
|
UNIQUE KEY `commitPHID` (`commitPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_customfieldnumericindex` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` bigint(20) NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_customfieldstorage` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_customfieldstringindex` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`(64))
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_diff` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-09-29 22:27:33 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`revisionID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`sourceMachine` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourcePath` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlSystem` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlBaseRevision` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlPath` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`lintStatus` int(10) unsigned NOT NULL,
|
|
|
|
`unitStatus` int(10) unsigned NOT NULL,
|
|
|
|
`lineCount` int(10) unsigned NOT NULL,
|
|
|
|
`branch` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`bookmark` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`creationMethod` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`repositoryUUID` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commitPHID` varbinary(64) DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `revisionID` (`revisionID`),
|
|
|
|
KEY `key_commit` (`commitPHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `differential_diffproperty` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`diffID` int(10) unsigned NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `diffID` (`diffID`,`name`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_difftransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_hiddencomment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`commentID` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_user` (`userPHID`,`commentID`),
|
|
|
|
KEY `key_comment` (`commentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `differential_hunk` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`changesetID` int(10) unsigned NOT NULL,
|
|
|
|
`oldOffset` int(10) unsigned NOT NULL,
|
|
|
|
`oldLen` int(10) unsigned NOT NULL,
|
|
|
|
`newOffset` int(10) unsigned NOT NULL,
|
|
|
|
`newLen` int(10) unsigned NOT NULL,
|
|
|
|
`dataType` binary(4) NOT NULL,
|
|
|
|
`dataEncoding` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dataFormat` binary(4) NOT NULL,
|
|
|
|
`data` longblob NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_changeset` (`changesetID`),
|
|
|
|
KEY `key_created` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `differential_reviewer` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`revisionPHID` varbinary(64) NOT NULL,
|
|
|
|
`reviewerPHID` varbinary(64) NOT NULL,
|
|
|
|
`reviewerStatus` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`lastActionDiffPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`lastCommentDiffPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`lastActorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`voidedPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`options` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_revision` (`revisionPHID`,`reviewerPHID`),
|
|
|
|
KEY `key_reviewer` (`reviewerPHID`,`revisionPHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revision` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`summary` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`testPlan` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`lastReviewerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`lineCount` int(10) unsigned DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`attached` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(40) NOT NULL,
|
|
|
|
`branchName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`activeDiffPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `authorPHID` (`authorPHID`,`status`),
|
|
|
|
KEY `repositoryPHID` (`repositoryPHID`),
|
|
|
|
KEY `key_status` (`status`,`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revision_fdocument` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revision_ffield` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revision_fngrams` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revision_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_revisionhash` (
|
|
|
|
`revisionID` int(10) unsigned NOT NULL,
|
|
|
|
`type` binary(4) NOT NULL,
|
|
|
|
`hash` binary(40) NOT NULL,
|
|
|
|
KEY `type` (`type`,`hash`),
|
|
|
|
KEY `revisionID` (`revisionID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_transaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `differential_transaction_comment` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`revisionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`changesetID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isNewFile` tinyint(1) NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
|
|
|
`fixedState` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`hasReplies` tinyint(1) NOT NULL,
|
|
|
|
`replyToCommentPHID` varbinary(64) DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
KEY `key_changeset` (`changesetID`),
|
|
|
|
KEY `key_draft` (`authorPHID`,`transactionPHID`),
|
|
|
|
KEY `key_revision` (`revisionPHID`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`type` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dst` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2013-01-17 01:42:41 +01:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_diviner` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_diviner`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `diviner_liveatom` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`symbolPHID` varbinary(64) NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`atomData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `symbolPHID` (`symbolPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_diviner`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `diviner_livebook` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`configurationData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `name` (`name`),
|
|
|
|
UNIQUE KEY `phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_diviner`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `diviner_livebooktransaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_diviner`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `diviner_livesymbol` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`bookPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`context` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`type` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`atomIndex` int(10) unsigned NOT NULL,
|
|
|
|
`identityHash` binary(12) NOT NULL,
|
|
|
|
`graphHash` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`title` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`titleSlugHash` binary(12) DEFAULT NULL,
|
|
|
|
`groupName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`summary` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`isDocumentable` tinyint(1) NOT NULL,
|
|
|
|
`nodeHash` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `identityHash` (`identityHash`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `graphHash` (`graphHash`),
|
|
|
|
UNIQUE KEY `nodeHash` (`nodeHash`),
|
|
|
|
KEY `key_slug` (`titleSlugHash`),
|
|
|
|
KEY `bookPHID` (`bookPHID`,`type`,`name`(64),`context`(64),`atomIndex`),
|
|
|
|
KEY `name` (`name`(64))
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_diviner`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`type` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dst` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_diviner`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_doorkeeper` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_doorkeeper`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `doorkeeper_externalobject` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectKey` binary(12) NOT NULL,
|
|
|
|
`applicationType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`applicationDomain` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectID` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectURI` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`importerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectKey`),
|
|
|
|
KEY `key_full` (`applicationType`,`applicationDomain`,`objectType`,`objectID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_doorkeeper`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_doorkeeper`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_draft` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_draft`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `draft` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`draftKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`draft` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `authorPHID` (`authorPHID`,`draftKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_draft`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `draft_versioneddraft` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`version` int(10) unsigned NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`,`authorPHID`,`version`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_drydock` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_authorization` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`blueprintPHID` varbinary(64) NOT NULL,
|
|
|
|
`blueprintAuthorizationState` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectAuthorizationState` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_unique` (`objectPHID`,`blueprintPHID`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`blueprintAuthorizationState`),
|
|
|
|
KEY `key_object` (`objectPHID`,`objectAuthorizationState`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_blueprint` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`blueprintName` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`details` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_blueprintname_ngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_blueprinttransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `drydock_command` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`targetPHID` varbinary(64) NOT NULL,
|
|
|
|
`command` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isConsumed` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_target` (`targetPHID`,`isConsumed`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_lease` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`until` int(10) unsigned DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`attributes` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`resourceType` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`resourcePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorizingPHID` varbinary(64) NOT NULL,
|
|
|
|
`acquiredEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`activatedEpoch` int(10) unsigned DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_resource` (`resourcePHID`,`status`),
|
|
|
|
KEY `key_status` (`status`),
|
|
|
|
KEY `key_owner` (`ownerPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_log` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`blueprintPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`resourcePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`leasePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`type` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`operationPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `epoch` (`epoch`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`type`),
|
|
|
|
KEY `key_resource` (`resourcePHID`,`type`),
|
|
|
|
KEY `key_lease` (`leasePHID`,`type`),
|
|
|
|
KEY `key_operation` (`operationPHID`,`type`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_repositoryoperation` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryTarget` longblob NOT NULL,
|
|
|
|
`operationType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`operationState` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isDismissed` tinyint(1) NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`,`operationState`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_resource` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`type` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`attributes` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`capabilities` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`blueprintPHID` varbinary(64) NOT NULL,
|
|
|
|
`until` int(10) unsigned DEFAULT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_type` (`type`,`status`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`status`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_slotlock` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`lockIndex` binary(12) NOT NULL,
|
|
|
|
`lockKey` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_lock` (`lockIndex`),
|
|
|
|
KEY `key_owner` (`ownerPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_fact` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_aggregate` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`factType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`valueX` bigint(20) unsigned NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `factType` (`factType`,`objectPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_chart` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`chartKey` binary(12) NOT NULL,
|
|
|
|
`chartParameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_chart` (`chartKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_cursor` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`position` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `name` (`name`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_intdatapoint` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`keyID` int(10) unsigned NOT NULL,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`dimensionID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`value` bigint(20) NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_dimension` (`keyID`,`dimensionID`),
|
|
|
|
KEY `key_object` (`objectID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_keydimension` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`factKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_factkey` (`factKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_objectdimension` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_raw` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`factType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectA` varbinary(64) NOT NULL,
|
|
|
|
`valueX` bigint(20) NOT NULL,
|
|
|
|
`valueY` bigint(20) NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `objectPHID` (`objectPHID`),
|
|
|
|
KEY `factType` (`factType`,`epoch`),
|
|
|
|
KEY `factType_2` (`factType`,`objectA`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_feed` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_feed`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `feed_storydata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
|
|
|
`storyType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storyData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `chronologicalKey` (`chronologicalKey`),
|
|
|
|
UNIQUE KEY `phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_feed`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `feed_storynotification` (
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`primaryObjectPHID` varbinary(64) NOT NULL,
|
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
|
|
|
`hasViewed` tinyint(1) NOT NULL,
|
|
|
|
UNIQUE KEY `userPHID` (`userPHID`,`chronologicalKey`),
|
|
|
|
KEY `userPHID_2` (`userPHID`,`hasViewed`,`primaryObjectPHID`),
|
|
|
|
KEY `key_object` (`primaryObjectPHID`),
|
|
|
|
KEY `key_chronological` (`chronologicalKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_feed`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `feed_storyreference` (
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`chronologicalKey`),
|
|
|
|
KEY `chronologicalKey` (`chronologicalKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_file` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`mimeType` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`byteSize` bigint(20) unsigned NOT NULL,
|
|
|
|
`storageEngine` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storageFormat` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storageHandle` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`secretKey` binary(20) DEFAULT NULL,
|
|
|
|
`contentHash` binary(64) DEFAULT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`ttl` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isExplicitUpload` tinyint(1) DEFAULT '1',
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isPartial` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`builtinKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_builtin` (`builtinKey`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `contentHash` (`contentHash`),
|
|
|
|
KEY `key_ttl` (`ttl`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_partial` (`authorPHID`,`isPartial`),
|
|
|
|
KEY `key_engine` (`storageEngine`,`storageHandle`(64))
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_chunk` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`chunkHandle` binary(12) NOT NULL,
|
|
|
|
`byteStart` bigint(20) unsigned NOT NULL,
|
|
|
|
`byteEnd` bigint(20) unsigned NOT NULL,
|
|
|
|
`dataFilePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_file` (`chunkHandle`,`byteStart`,`byteEnd`),
|
|
|
|
KEY `key_data` (`dataFilePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_externalrequest` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`filePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ttl` int(10) unsigned NOT NULL,
|
|
|
|
`uri` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`uriIndex` binary(12) NOT NULL,
|
|
|
|
`isSuccessful` tinyint(1) NOT NULL,
|
|
|
|
`responseMessage` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_uriindex` (`uriIndex`),
|
|
|
|
KEY `key_ttl` (`ttl`),
|
|
|
|
KEY `key_file` (`filePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_filename_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_imagemacro` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
|
|
|
`audioPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`audioBehavior` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `name` (`name`),
|
|
|
|
KEY `key_disabled` (`isDisabled`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_storageblob` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longblob NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_transaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_transaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `file_transformedfile` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`originalPHID` varbinary(64) NOT NULL,
|
|
|
|
`transform` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`transformedPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `originalPHID` (`originalPHID`,`transform`),
|
|
|
|
KEY `transformedPHID` (`transformedPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `macro_transaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `macro_transaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_flag` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_flag`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `flag` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`reasonPHID` varbinary(64) NOT NULL,
|
|
|
|
`color` int(10) unsigned NOT NULL,
|
|
|
|
`note` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `ownerPHID` (`ownerPHID`,`type`,`objectPHID`),
|
|
|
|
KEY `objectPHID` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_fund` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_backer` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`initiativePHID` varbinary(64) NOT NULL,
|
|
|
|
`backerPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`amountAsCurrency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_initiative` (`initiativePHID`),
|
|
|
|
KEY `key_backer` (`backerPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_backertransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`risks` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`totalAsCurrency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_status` (`status`),
|
|
|
|
KEY `key_owner` (`ownerPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiativetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fund`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiativetransaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_harbormaster` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_build` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildablePHID` varbinary(64) NOT NULL,
|
|
|
|
`buildPlanPHID` varbinary(64) NOT NULL,
|
|
|
|
`buildStatus` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`buildGeneration` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`planAutoKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`buildParameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`initiatorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_planautokey` (`buildablePHID`,`planAutoKey`),
|
|
|
|
KEY `key_buildable` (`buildablePHID`),
|
|
|
|
KEY `key_plan` (`buildPlanPHID`),
|
|
|
|
KEY `key_status` (`buildStatus`),
|
|
|
|
KEY `key_initiator` (`initiatorPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildable` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildablePHID` varbinary(64) NOT NULL,
|
|
|
|
`containerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`buildableStatus` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isManualBuildable` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_buildable` (`buildablePHID`),
|
|
|
|
KEY `key_container` (`containerPHID`),
|
|
|
|
KEY `key_manual` (`isManualBuildable`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildabletransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildartifact` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`artifactType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`artifactIndex` binary(12) NOT NULL,
|
|
|
|
`artifactKey` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`artifactData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`isReleased` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_artifact` (`artifactType`,`artifactIndex`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_garbagecollect` (`artifactType`,`dateCreated`),
|
|
|
|
KEY `key_target` (`buildTargetPHID`,`artifactType`),
|
|
|
|
KEY `key_index` (`artifactIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildcommand` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`targetPHID` varbinary(64) NOT NULL,
|
|
|
|
`command` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_target` (`targetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildlintmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`path` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`line` int(10) unsigned DEFAULT NULL,
|
|
|
|
`characterOffset` int(10) unsigned DEFAULT NULL,
|
|
|
|
`code` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`severity` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_target` (`buildTargetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildlog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`logSource` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`logType` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`duration` int(10) unsigned DEFAULT NULL,
|
|
|
|
`live` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`byteLength` bigint(20) unsigned NOT NULL,
|
|
|
|
`chunkFormat` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lineMap` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_buildtarget` (`buildTargetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildlogchunk` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`logID` int(10) unsigned NOT NULL,
|
|
|
|
`encoding` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`size` int(10) unsigned DEFAULT NULL,
|
|
|
|
`chunk` longblob NOT NULL,
|
|
|
|
`headOffset` bigint(20) unsigned NOT NULL,
|
|
|
|
`tailOffset` bigint(20) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_offset` (`logID`,`headOffset`,`tailOffset`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`receiverPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isConsumed` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_receiver` (`receiverPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildplan` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`planStatus` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`planAutoKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_planautokey` (`planAutoKey`),
|
|
|
|
KEY `key_status` (`planStatus`),
|
|
|
|
KEY `key_name` (`name`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildplanname_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildplantransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildstep` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildPlanPHID` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`stepAutoKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_stepautokey` (`buildPlanPHID`,`stepAutoKey`),
|
|
|
|
KEY `key_plan` (`buildPlanPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildsteptransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildtarget` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildPHID` varbinary(64) NOT NULL,
|
|
|
|
`buildStepPHID` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`variables` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`targetStatus` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dateStarted` int(10) unsigned DEFAULT NULL,
|
|
|
|
`dateCompleted` int(10) unsigned DEFAULT NULL,
|
|
|
|
`buildGeneration` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_build` (`buildPHID`,`buildStepPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildunitmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`engine` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`namespace` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`result` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`duration` double DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_target` (`buildTargetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_object` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_scratchtable` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`bigData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`nonmutableData` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `data` (`data`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_string` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`stringIndex` binary(12) NOT NULL,
|
|
|
|
`stringValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_string` (`stringIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `lisk_counter` (
|
|
|
|
`counterName` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`counterValue` bigint(20) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`counterName`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_herald` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_action` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
|
|
|
`action` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`target` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `ruleID` (`ruleID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_condition` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`fieldCondition` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`value` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `ruleID` (`ruleID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_rule` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`contentType` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mustMatchAll` tinyint(1) NOT NULL,
|
|
|
|
`configVersion` int(10) unsigned NOT NULL DEFAULT '1',
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`repetitionPolicy` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`ruleType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`isDisabled` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`triggerObjectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_trigger` (`triggerObjectPHID`),
|
|
|
|
KEY `key_name` (`name`(128)),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_ruletype` (`ruleType`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_ruleapplied` (
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
PRIMARY KEY (`ruleID`,`phid`),
|
|
|
|
KEY `phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_ruletransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_savedheader` (
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`header` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_transcript` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`time` int(10) unsigned NOT NULL,
|
|
|
|
`host` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`duration` double NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`dryRun` tinyint(1) NOT NULL,
|
|
|
|
`objectTranscript` longblob NOT NULL,
|
|
|
|
`ruleTranscripts` longblob NOT NULL,
|
|
|
|
`conditionTranscripts` longblob NOT NULL,
|
|
|
|
`applyTranscripts` longblob NOT NULL,
|
|
|
|
`garbageCollected` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `objectPHID` (`objectPHID`),
|
|
|
|
KEY `garbageCollected` (`garbageCollected`,`time`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_webhook` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`webhookURI` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`hmacKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_status` (`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_webhookrequest` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`webhookPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lastRequestResult` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lastRequestEpoch` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_ratelimit` (`webhookPHID`,`lastRequestResult`,`lastRequestEpoch`),
|
|
|
|
KEY `key_collect` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `herald_webhooktransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_legalpad` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `legalpad_document` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contributorCount` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`recentContributorPHIDs` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`versions` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`documentBodyPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`signatureType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`preamble` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`requireSignature` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_creator` (`creatorPHID`,`dateModified`),
|
|
|
|
KEY `key_required` (`requireSignature`,`dateModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `legalpad_documentbody` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`documentPHID` varbinary(64) NOT NULL,
|
|
|
|
`version` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`text` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_document` (`documentPHID`,`version`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `legalpad_documentsignature` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentPHID` varbinary(64) NOT NULL,
|
|
|
|
`documentVersion` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`signatureType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`signerName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signerEmail` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signatureData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`secretKey` binary(20) NOT NULL,
|
|
|
|
`verified` tinyint(1) DEFAULT '0',
|
|
|
|
`isExemption` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`exemptionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_signer` (`signerPHID`,`dateModified`),
|
|
|
|
KEY `secretKey` (`secretKey`),
|
|
|
|
KEY `key_document` (`documentPHID`,`signerPHID`,`documentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `legalpad_transaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `legalpad_transaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`documentID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
|
|
|
`fixedState` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`hasReplies` tinyint(1) NOT NULL,
|
|
|
|
`replyToCommentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`documentID`,`transactionPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_maniphest` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`(64))
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_nameindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`indexedObjectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexedObjectName` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`indexedObjectPHID`),
|
|
|
|
KEY `key_name` (`indexedObjectName`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_task` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`status` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`priority` int(10) unsigned NOT NULL,
|
|
|
|
`title` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`ownerOrdering` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`originalEmailSource` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`subpriority` double NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`points` double DEFAULT NULL,
|
|
|
|
`bridgedObjectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`subtype` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`closedEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`closerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_bridgedobject` (`bridgedObjectPHID`),
|
|
|
|
KEY `priority` (`priority`,`status`),
|
|
|
|
KEY `status` (`status`),
|
|
|
|
KEY `ownerPHID` (`ownerPHID`,`status`),
|
|
|
|
KEY `authorPHID` (`authorPHID`,`status`),
|
|
|
|
KEY `ownerOrdering` (`ownerOrdering`),
|
|
|
|
KEY `priority_2` (`priority`,`subpriority`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_dateModified` (`dateModified`),
|
|
|
|
KEY `key_title` (`title`(64)),
|
|
|
|
KEY `key_subtype` (`subtype`),
|
|
|
|
KEY `key_closed` (`closedEpoch`),
|
|
|
|
KEY `key_closer` (`closerPHID`,`closedEpoch`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_task_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_task_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_task_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_task_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_transaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `maniphest_transaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_meta_data` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_meta_data`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `hoststate` (
|
|
|
|
`stateKey` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`stateValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`stateKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_meta_data`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `patch_status` (
|
|
|
|
`patch` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`applied` int(10) unsigned NOT NULL,
|
|
|
|
`duration` bigint(20) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`patch`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
INSERT INTO `patch_status` VALUES ('phabricator:000.project.sql',1556231684,NULL),('phabricator:0000.legacy.sql',1556231684,NULL),('phabricator:001.maniphest_projects.sql',1556231684,NULL),('phabricator:002.oauth.sql',1556231684,NULL),('phabricator:003.more_oauth.sql',1556231684,NULL),('phabricator:004.daemonrepos.sql',1556231684,NULL),('phabricator:005.workers.sql',1556231684,NULL),('phabricator:006.repository.sql',1556231684,NULL),('phabricator:007.daemonlog.sql',1556231684,NULL),('phabricator:008.repoopt.sql',1556231684,NULL),('phabricator:009.repo_summary.sql',1556231684,NULL),('phabricator:010.herald.sql',1556231684,NULL),('phabricator:011.badcommit.sql',1556231684,NULL),('phabricator:012.dropphidtype.sql',1556231684,NULL),('phabricator:013.commitdetail.sql',1556231684,NULL),('phabricator:014.shortcuts.sql',1556231684,NULL),('phabricator:015.preferences.sql',1556231684,NULL),('phabricator:016.userrealnameindex.sql',1556231684,NULL),('phabricator:017.sessionkeys.sql',1556231684,NULL),('phabricator:018.owners.sql',1556231684,NULL),('phabricator:019.arcprojects.sql',1556231684,NULL),('phabricator:020.pathcapital.sql',1556231684,NULL),('phabricator:021.xhpastview.sql',1556231684,NULL),('phabricator:022.differentialcommit.sql',1556231684,NULL),('phabricator:023.dxkeys.sql',1556231685,NULL),('phabricator:024.mlistkeys.sql',1556231685,NULL),('phabricator:025.commentopt.sql',1556231685,NULL),('phabricator:026.diffpropkey.sql',1556231685,NULL),('phabricator:027.metamtakeys.sql',1556231685,NULL),('phabricator:028.systemagent.sql',1556231685,NULL),('phabricator:029.cursors.sql',1556231685,NULL),('phabricator:030.imagemacro.sql',1556231685,NULL),('phabricator:031.workerrace.sql',1556231685,NULL),('phabricator:032.viewtime.sql',1556231685,NULL),('phabricator:033.privtest.sql',1556231685,NULL),('phabricator:034.savedheader.sql',1556231685,NULL),('phabricator:035.proxyimage.sql',1556231685,NULL),('phabricator:036.mailkey.sql',1556231685,NULL),('phabricator:037.setuptest.sql',1556231685,NULL),('phabricator:038.admin.sql',1556231685,NULL),('phabricator:039.userlog.sql',1556231685,NULL),('phabricator:040.transform.sql',1556231685,NULL),('phabricator:041.heraldrepetition.sql',1556231685,NULL),('phabricator:042.commentmetadata.sql',1556231685,NULL),('phabricator:043.pastebin.sql',1556231685,NULL),('phabricator:044.countdown.sql',1556231685,NULL),('phabricator:045.timezone.sql',1556231685,NULL),('phabricator:046.conduittoken.sql',1556231685,NULL),('phabricator:047.projectstatus.sql',1556231685,NULL),('phabricator:048.relationshipkeys.sql',1556231685,NULL),('phabricator:049.projectowner.sql',1556231685,NULL),('phabricator:050.taskdenormal.sql',1556231685,NULL),('phabricator:051.projectfilter.sql',1556231685,NULL),('phabricator:052.pastelanguage.sql',1556231685,NULL),('phabricator:053.feed.sql',1556231685,NULL),('phabricator:054.subscribers.sql',1556231685,NULL),('phabricator:055.add_author_to_files.sql',1556231685,NULL),('phabricator:056.slowvote.sql',1556231685,NULL),('phabricator:057.parsecache.sql',1556231685,NULL),('phabricator:058.missingkeys.sql',1556231685,NULL),('phabricator:059.engines.php',1556231685,NULL),('phabricator:060.phriction.sql',1556231685,NULL),('phabricator:061.phrictioncontent.sql',1556231685,NULL),('phabricator:062.phrictionmenu.sql',1556231685,NULL),('phabricator:063.pasteforks.sql',1556231685,NULL),('phabricator:064.subprojects.sql',1556231685,NULL),('phabricator:065.sshkeys.sql',1556231685,NULL),('phabricator:066.phrictioncontent.sql',1556231685,NULL),('phabricator:067.preferences.sql',1556231685,NULL),('phabricator:068.maniphestauxiliarystorage.sql',1556231685,NULL),('phabricator:069.heraldxscript.sql',1556231685,NULL),('phabricator:070.differentialaux.sql',1556231685,NULL),('phabricator:071.contentsource.sql',1556231685,NULL),('phabricator:072.blamerevert.sql',1556231685,NULL),('phabricator:073.reposymbols.sql',1556231685,NULL),('phabricator:074.affectedpath.sql',1556231685,NULL),('phabricator:075.revisionhash.sql',1556231685,NULL),('phabricator:076.indexedlanguages.sql',1556231685,NULL),('phabricator:077.or
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_metamta` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `metamta_applicationemail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`applicationPHID` varbinary(64) NOT NULL,
|
|
|
|
`address` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`configData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_address` (`address`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_application` (`applicationPHID`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `metamta_applicationemailtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `metamta_mail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`actorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`message` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`relatedPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `relatedPHID` (`relatedPHID`),
|
|
|
|
KEY `key_created` (`dateCreated`),
|
|
|
|
KEY `key_actorPHID` (`actorPHID`),
|
|
|
|
KEY `status` (`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `metamta_mailproperties` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `metamta_receivedmail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`headers` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`bodies` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`attachments` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`relatedPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`message` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`messageIDHash` binary(12) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `relatedPHID` (`relatedPHID`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `key_messageIDHash` (`messageIDHash`),
|
|
|
|
KEY `key_created` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_multimeter` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_context` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameHash` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_hash` (`nameHash`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_event` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`eventType` int(10) unsigned NOT NULL,
|
|
|
|
`eventLabelID` int(10) unsigned NOT NULL,
|
|
|
|
`resourceCost` bigint(20) NOT NULL,
|
|
|
|
`sampleRate` int(10) unsigned NOT NULL,
|
|
|
|
`eventContextID` int(10) unsigned NOT NULL,
|
|
|
|
`eventHostID` int(10) unsigned NOT NULL,
|
|
|
|
`eventViewerID` int(10) unsigned NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`requestKey` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_request` (`requestKey`),
|
|
|
|
KEY `key_type` (`eventType`,`epoch`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_host` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameHash` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_hash` (`nameHash`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_label` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameHash` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_hash` (`nameHash`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_viewer` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameHash` binary(12) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_hash` (`nameHash`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_nuance` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_importcursordata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`sourcePHID` varbinary(64) NOT NULL,
|
|
|
|
`cursorKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cursorType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_source` (`sourcePHID`,`cursorKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_item` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`requestorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`sourcePHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`queuePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`itemType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`itemKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`itemContainerKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_item` (`sourcePHID`,`itemKey`),
|
|
|
|
KEY `key_source` (`sourcePHID`,`status`),
|
|
|
|
KEY `key_owner` (`ownerPHID`,`status`),
|
|
|
|
KEY `key_requestor` (`requestorPHID`,`status`),
|
|
|
|
KEY `key_queue` (`queuePHID`,`status`),
|
|
|
|
KEY `key_container` (`sourcePHID`,`itemContainerKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_itemcommand` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`itemPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`command` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`queuePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`status` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_pending` (`itemPHID`,`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_itemtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_itemtransaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_queue` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_queuetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_queuetransaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_source` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`type` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`defaultQueuePHID` varbinary(64) NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_type` (`type`,`dateModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_sourcename_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_sourcetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `nuance_sourcetransaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_oauth_server` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_oauthclientauthorization` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`scope` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `userPHID` (`userPHID`,`clientPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_oauthserveraccesstoken` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`token` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `token` (`token`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_oauthserverauthorizationcode` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`code` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`clientPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientSecret` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`redirectURI` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `code` (`code`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_oauthserverclient` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`secret` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`redirectURI` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`isTrusted` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `creatorPHID` (`creatorPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_transaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_owners` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`(64))
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_name_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_owner` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`packageID` int(10) unsigned NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `packageID` (`packageID`,`userPHID`),
|
|
|
|
KEY `userPHID` (`userPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_package` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`autoReview` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dominion` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`auditingState` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_package_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_package_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_package_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_package_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_packagetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `owners_path` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`packageID` int(10) unsigned NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`path` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`excluded` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`pathIndex` binary(12) NOT NULL,
|
|
|
|
`pathDisplay` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_path` (`packageID`,`repositoryPHID`,`pathIndex`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`,`pathIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_packages` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_package` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`publisherPHID` varbinary(64) NOT NULL,
|
|
|
|
`packageKey` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_package` (`publisherPHID`,`packageKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_packagename_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_packagetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_publisher` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`publisherKey` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_publisher` (`publisherKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_publishername_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_publishertransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_version` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`packagePHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_package` (`packagePHID`,`name`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_versionname_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_packages`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `packages_versiontransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_passphrase` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`credentialType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providesType` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`username` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`secretID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isDestroyed` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isLocked` tinyint(1) NOT NULL,
|
|
|
|
`allowConduit` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_secret` (`secretID`),
|
|
|
|
KEY `key_type` (`credentialType`),
|
|
|
|
KEY `key_provides` (`providesType`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credentialtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `passphrase_secret` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`secretData` longblob NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_pastebin` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pastebin_paste` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`language` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`parentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) DEFAULT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `parentPHID` (`parentPHID`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_language` (`language`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pastebin_pastetransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pastebin_pastetransaction_comment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned DEFAULT NULL,
|
|
|
|
`lineLength` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phame` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`domain` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`configData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) DEFAULT NULL,
|
|
|
|
`editPolicy` varbinary(64) DEFAULT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`headerImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`subtitle` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parentDomain` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`parentSite` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`domainFullURI` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `domain` (`domain`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blog_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blog_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blog_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blog_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_blogtransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_post` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`bloggerPHID` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phameTitle` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`body` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`visibility` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`configData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`datePublished` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`blogPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`subtitle` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`headerImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `bloggerPosts` (`bloggerPHID`,`visibility`,`datePublished`,`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_post_fdocument` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_post_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_post_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_post_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_posttransaction` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phame_posttransaction_comment` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phlux` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phlux`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phlux`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phlux`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phlux_transaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phlux`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phlux_variable` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2016-01-19 18:56:48 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`variableKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`variableValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_key` (`variableKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_pholio` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_image` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isObsolete` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`replacesImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`mockPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_mock` (`mockPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`coverPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2016-01-19 18:56:48 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock_fdocument` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock_ffield` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock_fngrams` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock_fngrams_common` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_pholio`;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2016-01-19 18:56:48 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `pholio_transaction_comment` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`imageID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`x` int(10) unsigned DEFAULT NULL,
|
|
|
|
`y` int(10) unsigned DEFAULT NULL,
|
|
|
|
`width` int(10) unsigned DEFAULT NULL,
|
|
|
|
`height` int(10) unsigned DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`imageID`,`transactionPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phortune` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-06-24 23:15:35 +02:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2016-06-24 23:15:35 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phortune_account` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`billingName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`billingAddress` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2016-01-19 18:56:48 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_accounttransaction` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2016-01-19 18:56:48 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phortune_cart` (
|
2016-01-19 18:56:48 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cartClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`subscriptionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`isInvoice` tinyint(1) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_account` (`accountPHID`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`),
|
|
|
|
KEY `key_subscription` (`subscriptionPHID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phortune_carttransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_charge` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`cartPHID` varbinary(64) NOT NULL,
|
|
|
|
`paymentMethodPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`amountAsCurrency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerPHID` varbinary(64) NOT NULL,
|
|
|
|
`amountRefundedAsCurrency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refundingPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`refundedChargePHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_cart` (`cartPHID`),
|
|
|
|
KEY `key_account` (`accountPHID`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`),
|
|
|
|
KEY `key_provider` (`providerPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_merchant` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contactInfo` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`invoiceEmail` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`invoiceFooter` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_merchanttransaction` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_paymentmethod` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`brand` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`expires` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lastFourDigits` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_account` (`accountPHID`,`status`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`,`accountPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phortune_paymentproviderconfig` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerClassKey` binary(12) NOT NULL,
|
|
|
|
`providerClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isEnabled` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_merchant` (`merchantPHID`,`providerClassKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_paymentproviderconfigtransaction` (
|
2015-03-02 18:57:38 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2015-03-02 18:57:38 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phortune_product` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`productClassKey` binary(12) NOT NULL,
|
|
|
|
`productClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`productRefKey` binary(12) NOT NULL,
|
|
|
|
`productRef` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_product` (`productClassKey`,`productRefKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_purchase` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`productPHID` varbinary(64) NOT NULL,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`cartPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`basePriceAsCurrency` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`quantity` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_cart` (`cartPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_subscription` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`triggerPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`subscriptionClassKey` binary(12) NOT NULL,
|
|
|
|
`subscriptionClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`subscriptionRefKey` binary(12) NOT NULL,
|
|
|
|
`subscriptionRef` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`defaultPaymentMethodPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2016-06-24 23:15:35 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_subscription` (`subscriptionClassKey`,`subscriptionRefKey`),
|
|
|
|
KEY `key_account` (`accountPHID`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phrequent` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phrequent`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phrequent_usertime` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`note` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`dateStarted` int(10) unsigned NOT NULL,
|
|
|
|
`dateEnded` int(10) unsigned DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phriction` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phriction_content` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`version` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`title` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`slug` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`changeType` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`changeRef` int(10) unsigned DEFAULT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`documentPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`documentPHID`,`version`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `slug` (`slug`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_document` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`slug` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`depth` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`contentPHID` varbinary(64) NOT NULL,
|
|
|
|
`editedEpoch` int(10) unsigned NOT NULL,
|
|
|
|
`maxVersion` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `slug` (`slug`),
|
|
|
|
UNIQUE KEY `depth` (`depth`,`slug`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_space` (`spacePHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_document_fdocument` (
|
2015-01-23 01:10:26 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2015-01-23 01:10:26 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_document_ffield` (
|
2015-01-23 01:10:26 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2015-01-23 01:10:26 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_document_fngrams` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_document_fngrams_common` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `phriction_transaction_comment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phurl` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phurl`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`type` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dst` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_phurlname_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_object` (`objectID`),
|
|
|
|
KEY `key_ngram` (`ngram`,`objectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_url` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`longURL` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`alias` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_instance` (`alias`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_urltransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_urltransaction_comment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_policy` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_policy`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `policy` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`rules` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`defaultAction` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `phid` (`phid`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_ponder` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_answer` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`questionID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`voteCount` int(10) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_oneanswerperquestion` (`questionID`,`authorPHID`),
|
|
|
|
KEY `questionID` (`questionID`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `status` (`status`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_answertransaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `ponder_answertransaction_comment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_question` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`answerCount` int(10) unsigned NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`answerWiki` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `authorPHID` (`authorPHID`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `status` (`status`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_space` (`spacePHID`)
|
2019-04-26 00:34:42 +02:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_question_fdocument` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_question_ffield` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_question_fngrams` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2015-01-23 01:10:26 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `ponder_question_fngrams_common` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_questiontransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `ponder_questiontransaction_comment` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_project` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`joinPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isMembershipLocked` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`icon` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`color` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`primarySlug` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`parentProjectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`hasWorkboard` tinyint(1) NOT NULL,
|
|
|
|
`hasMilestones` tinyint(1) NOT NULL,
|
|
|
|
`hasSubprojects` tinyint(1) NOT NULL,
|
|
|
|
`milestoneNumber` int(10) unsigned DEFAULT NULL,
|
|
|
|
`projectPath` varbinary(64) NOT NULL,
|
|
|
|
`projectDepth` int(10) unsigned NOT NULL,
|
|
|
|
`projectPathKey` binary(4) NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`subtype` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_pathkey` (`projectPathKey`),
|
2017-04-23 15:24:01 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_primaryslug` (`primarySlug`),
|
|
|
|
UNIQUE KEY `key_milestone` (`parentProjectPHID`,`milestoneNumber`),
|
|
|
|
KEY `key_icon` (`icon`),
|
|
|
|
KEY `key_color` (`color`),
|
|
|
|
KEY `key_path` (`projectPath`,`projectDepth`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_column` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` int(10) unsigned NOT NULL,
|
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
|
|
|
`projectPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`proxyPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`triggerPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_proxy` (`projectPHID`,`proxyPHID`),
|
|
|
|
KEY `key_status` (`projectPHID`,`status`,`sequence`),
|
|
|
|
KEY `key_sequence` (`projectPHID`,`sequence`),
|
|
|
|
KEY `key_trigger` (`triggerPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_columnposition` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`boardPHID` varbinary(64) NOT NULL,
|
|
|
|
`columnPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `boardPHID` (`boardPHID`,`columnPHID`,`objectPHID`),
|
|
|
|
KEY `objectPHID` (`objectPHID`,`boardPHID`),
|
|
|
|
KEY `boardPHID_2` (`boardPHID`,`columnPHID`,`sequence`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_columntransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldnumericindex` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` bigint(20) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldstorage` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldstringindex` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`(64))
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_datasourcetoken` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`projectID` int(10) unsigned NOT NULL,
|
|
|
|
`token` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `token` (`token`,`projectID`),
|
|
|
|
KEY `projectID` (`projectID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_project_fdocument` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_project_ffield` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_project_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_project_fngrams_common` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_slug` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`projectPHID` varbinary(64) NOT NULL,
|
|
|
|
`slug` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_slug` (`slug`),
|
|
|
|
KEY `key_projectPHID` (`projectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_trigger` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`ruleset` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_triggertransaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `project_triggerusage` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`triggerPHID` varbinary(64) NOT NULL,
|
|
|
|
`examplePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`columnCount` int(10) unsigned NOT NULL,
|
|
|
|
`activeColumnCount` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_trigger` (`triggerPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_repository` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`callsign` varchar(32) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`versionControlSystem` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`uuid` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`pushPolicy` varbinary(64) NOT NULL,
|
|
|
|
`credentialPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`almanacServicePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`repositorySlug` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`localPath` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `callsign` (`callsign`),
|
|
|
|
UNIQUE KEY `key_slug` (`repositorySlug`),
|
|
|
|
UNIQUE KEY `key_local` (`localPath`),
|
|
|
|
KEY `key_vcs` (`versionControlSystem`),
|
|
|
|
KEY `key_name` (`name`(128)),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_auditrequest` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`auditorPHID` varbinary(64) NOT NULL,
|
|
|
|
`commitPHID` varbinary(64) NOT NULL,
|
|
|
|
`auditStatus` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`auditReasons` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_unique` (`commitPHID`,`auditorPHID`),
|
|
|
|
KEY `commitPHID` (`commitPHID`),
|
|
|
|
KEY `auditorPHID` (`auditorPHID`,`auditStatus`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_branch` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lintCommit` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `repositoryID` (`repositoryID`,`name`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commit` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`commitIdentifier` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`auditStatus` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`summary` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`importStatus` int(10) unsigned NOT NULL,
|
|
|
|
`authorIdentityPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`committerIdentityPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_commit_identity` (`commitIdentifier`,`repositoryID`),
|
|
|
|
KEY `repositoryID_2` (`repositoryID`,`epoch`),
|
|
|
|
KEY `authorPHID` (`authorPHID`,`auditStatus`,`epoch`),
|
|
|
|
KEY `repositoryID` (`repositoryID`,`importStatus`),
|
|
|
|
KEY `key_epoch` (`epoch`),
|
|
|
|
KEY `key_author` (`authorPHID`,`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commit_fdocument` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-01-23 01:10:26 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commit_ffield` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commit_fngrams` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commit_fngrams_common` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commitdata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`commitID` int(10) unsigned NOT NULL,
|
|
|
|
`authorName` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`commitMessage` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`commitDetails` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `commitID` (`commitID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_commithint` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`oldCommitIdentifier` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newCommitIdentifier` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`hintType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_old` (`repositoryPHID`,`oldCommitIdentifier`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_coverage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`branchID` int(10) unsigned NOT NULL,
|
|
|
|
`commitID` int(10) unsigned NOT NULL,
|
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`coverage` longblob NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_path` (`branchID`,`pathID`,`commitID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_filesystem` (
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`parentID` int(10) unsigned NOT NULL,
|
|
|
|
`svnCommit` int(10) unsigned NOT NULL,
|
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`existed` tinyint(1) NOT NULL,
|
|
|
|
`fileType` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`repositoryID`,`parentID`,`pathID`,`svnCommit`),
|
|
|
|
KEY `repositoryID` (`repositoryID`,`svnCommit`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `repository_gitlfsref` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectHash` binary(64) NOT NULL,
|
|
|
|
`byteSize` bigint(20) unsigned NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_hash` (`repositoryPHID`,`objectHash`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_identity` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`automaticGuessedUserPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`manuallySetUserPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`currentEffectiveUserPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`identityNameHash` binary(12) NOT NULL,
|
|
|
|
`identityNameRaw` longblob NOT NULL,
|
|
|
|
`identityNameEncoding` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_identity` (`identityNameHash`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_identitytransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`transactionType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_lintmessage` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`branchID` int(10) unsigned NOT NULL,
|
|
|
|
`path` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`line` int(10) unsigned NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`code` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`severity` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `branchID` (`branchID`,`path`(64)),
|
|
|
|
KEY `branchID_2` (`branchID`,`code`,`path`(64)),
|
|
|
|
KEY `key_author` (`authorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_mirror` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`remoteURI` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`credentialPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_oldref` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`commitIdentifier` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_parents` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`childCommitID` int(10) unsigned NOT NULL,
|
|
|
|
`parentCommitID` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_child` (`childCommitID`,`parentCommitID`),
|
|
|
|
KEY `key_parent` (`parentCommitID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_path` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`path` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`pathHash` binary(32) NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `pathHash` (`pathHash`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_pathchange` (
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`commitID` int(10) unsigned NOT NULL,
|
|
|
|
`targetPathID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`targetCommitID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`changeType` int(10) unsigned NOT NULL,
|
|
|
|
`fileType` int(10) unsigned NOT NULL,
|
|
|
|
`isDirect` tinyint(1) NOT NULL,
|
|
|
|
`commitSequence` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`commitID`,`pathID`),
|
|
|
|
KEY `repositoryID` (`repositoryID`,`pathID`,`commitSequence`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_pullevent` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`pullerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`remoteAddress` varbinary(64) DEFAULT NULL,
|
|
|
|
`remoteProtocol` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`resultType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`resultCode` int(10) unsigned NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_pushevent` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`pusherPHID` varbinary(64) NOT NULL,
|
|
|
|
`remoteAddress` varbinary(64) DEFAULT NULL,
|
|
|
|
`remoteProtocol` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`rejectCode` int(10) unsigned NOT NULL,
|
|
|
|
`rejectDetails` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`requestIdentifier` binary(12) DEFAULT NULL,
|
|
|
|
`writeWait` bigint(20) unsigned DEFAULT NULL,
|
|
|
|
`readWait` bigint(20) unsigned DEFAULT NULL,
|
|
|
|
`hostWait` bigint(20) unsigned DEFAULT NULL,
|
|
|
|
`hookWait` bigint(20) unsigned DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_identifier` (`requestIdentifier`),
|
|
|
|
KEY `key_reject` (`rejectCode`,`rejectDetails`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_pushlog` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`pushEventPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`pusherPHID` varbinary(64) NOT NULL,
|
|
|
|
`refType` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refNameHash` binary(12) DEFAULT NULL,
|
|
|
|
`refNameRaw` longblob,
|
|
|
|
`refNameEncoding` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`refOld` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`refNew` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mergeBase` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`changeFlags` int(10) unsigned NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_ref` (`repositoryPHID`,`refNew`),
|
|
|
|
KEY `key_pusher` (`pusherPHID`),
|
|
|
|
KEY `key_name` (`repositoryPHID`,`refNameHash`),
|
|
|
|
KEY `key_event` (`pushEventPHID`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_refcursor` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`refType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refNameHash` binary(12) NOT NULL,
|
|
|
|
`refNameRaw` longblob NOT NULL,
|
|
|
|
`refNameEncoding` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ref` (`repositoryPHID`,`refType`,`refNameHash`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_refposition` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`cursorID` int(10) unsigned NOT NULL,
|
|
|
|
`commitIdentifier` varchar(40) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_position` (`cursorID`,`commitIdentifier`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_repository_fdocument` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_repository_ffield` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_repository_fngrams` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_repository_fngrams_common` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_statusmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`statusType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`statusCode` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`messageCount` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `repositoryID` (`repositoryID`,`statusType`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_summary` (
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
|
|
|
`size` int(10) unsigned NOT NULL,
|
|
|
|
`lastCommitID` int(10) unsigned NOT NULL,
|
|
|
|
`epoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`repositoryID`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_symbol` (
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`symbolContext` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolName` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolType` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolLanguage` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
KEY `symbolName` (`symbolName`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_syncevent` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`fromDevicePHID` varbinary(64) NOT NULL,
|
|
|
|
`deviceVersion` int(10) unsigned DEFAULT NULL,
|
|
|
|
`fromDeviceVersion` int(10) unsigned DEFAULT NULL,
|
|
|
|
`resultType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`resultCode` int(10) unsigned NOT NULL,
|
|
|
|
`syncWait` bigint(20) unsigned NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_transaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `repository_uri` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`uri` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinProtocol` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`builtinIdentifier` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`ioType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`displayType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`credentialPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_builtin` (`repositoryPHID`,`builtinProtocol`,`builtinIdentifier`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2017-09-12 17:16:28 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `repository_uriindex` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryURI` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-09-12 17:16:28 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_uri` (`repositoryURI`(128))
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_uritransaction` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `repository_workingcopyversion` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryVersion` int(10) unsigned NOT NULL,
|
|
|
|
`isWriting` tinyint(1) NOT NULL,
|
|
|
|
`writeProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`lockOwner` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_workingcopy` (`repositoryPHID`,`devicePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_search` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_document` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`documentType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`documentTitle` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`documentCreated` int(10) unsigned NOT NULL,
|
|
|
|
`documentModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`phid`),
|
|
|
|
KEY `documentCreated` (`documentCreated`),
|
|
|
|
KEY `key_type` (`documentType`,`documentCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `search_documentfield` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phidType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`field` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`auxPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} COLLATE {$COLLATE_FULLTEXT},
|
|
|
|
`stemmedCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT},
|
|
|
|
KEY `phid` (`phid`),
|
|
|
|
FULLTEXT KEY `key_corpus` (`corpus`,`stemmedCorpus`)
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `search_documentrelationship` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`relatedPHID` varbinary(64) NOT NULL,
|
|
|
|
`relation` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`relatedType` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`relatedTime` int(10) unsigned NOT NULL,
|
|
|
|
KEY `phid` (`phid`),
|
|
|
|
KEY `relatedPHID` (`relatedPHID`,`relation`),
|
|
|
|
KEY `relation` (`relation`,`relatedPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_editengineconfiguration` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`engineKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDefault` tinyint(1) NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isEdit` tinyint(1) NOT NULL,
|
|
|
|
`createOrder` int(10) unsigned NOT NULL,
|
|
|
|
`editOrder` int(10) unsigned NOT NULL,
|
|
|
|
`subtype` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_engine` (`engineKey`,`builtinKey`),
|
|
|
|
KEY `key_default` (`engineKey`,`isDefault`,`isDisabled`),
|
|
|
|
KEY `key_edit` (`engineKey`,`isEdit`,`isDisabled`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_editengineconfigurationtransaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `search_indexversion` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`extensionKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`version` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_object` (`objectPHID`,`extensionKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_namedquery` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`engineClassName` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`queryName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`queryKey` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isBuiltin` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDisabled` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`sequence` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_userquery` (`userPHID`,`engineClassName`,`queryKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `search_namedqueryconfig` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`engineClassName` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`scopePHID` varbinary(64) NOT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_scope` (`engineClassName`,`scopePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_profilepanelconfiguration` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`profilePHID` varbinary(64) NOT NULL,
|
|
|
|
`menuItemKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`menuItemOrder` int(10) unsigned DEFAULT NULL,
|
|
|
|
`visibility` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`menuItemProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`customPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_profile` (`profilePHID`,`menuItemOrder`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_profilepanelconfigurationtransaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `search_savedquery` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`engineClassName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`queryKey` varchar(12) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_queryKey` (`queryKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `stopwords` (
|
|
|
|
`value` varchar(32) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
INSERT INTO `stopwords` VALUES ('the'),('be'),('and'),('of'),('a'),('in'),('to'),('have'),('it'),('I'),('that'),('for'),('you'),('he'),('with'),('on'),('do'),('say'),('this'),('they'),('at'),('but'),('we'),('his'),('from'),('not'),('by'),('or'),('as'),('what'),('go'),('their'),('can'),('who'),('get'),('if'),('would'),('all'),('my'),('will'),('up'),('there'),('so'),('its'),('us');
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_slowvote` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
2017-09-12 17:16:28 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
2017-09-12 17:16:28 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `slowvote_choice` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`pollID` int(10) unsigned NOT NULL,
|
|
|
|
`optionID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `pollID` (`pollID`),
|
|
|
|
KEY `authorPHID` (`authorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `slowvote_option` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`pollID` int(10) unsigned NOT NULL,
|
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `pollID` (`pollID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `slowvote_poll` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`question` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`responseVisibility` int(10) unsigned NOT NULL,
|
|
|
|
`shuffle` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`method` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `slowvote_transaction` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `slowvote_transaction_comment` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`content` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDeleted` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_spaces` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_spaces`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_spaces`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_spaces`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `spaces_namespace` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`namespaceName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isDefaultNamespace` tinyint(1) DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`description` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isArchived` tinyint(1) NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_default` (`isDefaultNamespace`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_spaces`;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `spaces_namespacetransaction` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_system` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_system`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `system_actionlog` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`actorHash` binary(12) NOT NULL,
|
|
|
|
`actorIdentity` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`action` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`score` double NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_epoch` (`epoch`),
|
|
|
|
KEY `key_action` (`actorHash`,`action`,`epoch`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_system`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `system_destructionlog` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectClass` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rootLogID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`objectMonogram` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_epoch` (`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_token` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_token`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `token_count` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`tokenCount` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_objectPHID` (`objectPHID`),
|
|
|
|
KEY `key_count` (`tokenCount`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_token`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `token_given` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_all` (`objectPHID`,`authorPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_token` (`tokenPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_token`;
|
2014-11-07 21:29:24 +01:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `token_token` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`name` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`flavor` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenImagePHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_builtin` (`builtinKey`),
|
|
|
|
KEY `key_creator` (`creatorPHID`,`dateModified`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_user` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `phabricator_session` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sessionKey` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sessionStart` int(10) unsigned NOT NULL,
|
|
|
|
`sessionExpires` int(10) unsigned NOT NULL,
|
|
|
|
`highSecurityUntil` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isPartial` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`signedLegalpadDocuments` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `sessionKey` (`sessionKey`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_identity` (`userPHID`,`type`),
|
|
|
|
KEY `key_expires` (`sessionExpires`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userName` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`realName` varchar(128) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`conduitCertificate` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isSystemAgent` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
|
|
|
`isAdmin` tinyint(1) NOT NULL,
|
|
|
|
`isEmailVerified` int(10) unsigned NOT NULL,
|
|
|
|
`isApproved` int(10) unsigned NOT NULL,
|
|
|
|
`accountSecret` binary(64) NOT NULL,
|
|
|
|
`isEnrolledInMultiFactor` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`availabilityCache` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`availabilityCacheTTL` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isMailingList` tinyint(1) NOT NULL,
|
|
|
|
`defaultProfileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`defaultProfileImageVersion` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `userName` (`userName`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `realName` (`realName`),
|
|
|
|
KEY `key_approved` (`isApproved`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_authinvite` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`emailAddress` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`verificationHash` binary(12) NOT NULL,
|
|
|
|
`acceptedByPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_address` (`emailAddress`),
|
|
|
|
UNIQUE KEY `key_code` (`verificationHash`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_cache` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`cacheIndex` binary(12) NOT NULL,
|
|
|
|
`cacheKey` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheData` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_usercache` (`userPHID`,`cacheIndex`),
|
|
|
|
KEY `key_cachekey` (`cacheIndex`),
|
|
|
|
KEY `key_cachetype` (`cacheType`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_configuredcustomfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_customfieldstringindex` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_join` (`objectPHID`,`indexKey`,`indexValue`(64)),
|
|
|
|
KEY `key_find` (`indexKey`,`indexValue`(64))
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `user_email` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`address` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`isVerified` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isPrimary` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`verificationCode` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `address` (`address`),
|
|
|
|
KEY `userPHID` (`userPHID`,`isPrimary`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_externalaccount` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`accountType` varchar(16) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountDomain` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountSecret` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT},
|
|
|
|
`accountID` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`displayName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`username` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`realName` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`email` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`emailVerified` tinyint(1) NOT NULL,
|
|
|
|
`accountURI` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerConfigPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `account_details` (`accountType`,`accountDomain`,`accountID`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_user` (`userPHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_log` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`actorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`action` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`remoteAddr` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`session` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `actorPHID` (`actorPHID`,`dateCreated`),
|
|
|
|
KEY `userPHID` (`userPHID`,`dateCreated`),
|
|
|
|
KEY `action` (`action`,`dateCreated`),
|
|
|
|
KEY `dateCreated` (`dateCreated`),
|
|
|
|
KEY `remoteAddr` (`remoteAddr`,`dateCreated`),
|
|
|
|
KEY `session` (`session`,`dateCreated`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `user_nametoken` (
|
|
|
|
`token` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`userID` int(10) unsigned NOT NULL,
|
|
|
|
KEY `token` (`token`(128)),
|
|
|
|
KEY `userID` (`userID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_preferences` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`preferences` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`builtinKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_builtin` (`builtinKey`),
|
|
|
|
UNIQUE KEY `key_user` (`userPHID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_preferencestransaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE TABLE `user_profile` (
|
2016-06-24 23:15:35 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`blurb` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`icon` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-06-24 23:15:35 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `userPHID` (`userPHID`)
|
2016-06-24 23:15:35 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2016-06-24 23:15:35 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_transaction` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_user_fdocument` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`epochCreated` int(10) unsigned NOT NULL,
|
|
|
|
`epochModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_owner` (`ownerPHID`),
|
|
|
|
KEY `key_created` (`epochCreated`),
|
|
|
|
KEY `key_modified` (`epochModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_user_ffield` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`fieldKey` varchar(4) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rawCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`termCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`normalCorpus` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_documentfield` (`documentID`,`fieldKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_user_fngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_ngram` (`ngram`,`documentID`),
|
|
|
|
KEY `key_object` (`documentID`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_user`;
|
2015-09-29 22:27:33 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `user_user_fngrams_common` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`ngram` char(3) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`needsCollection` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_ngram` (`ngram`),
|
|
|
|
KEY `key_collect` (`needsCollection`)
|
2015-09-29 22:27:33 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_worker` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
|
|
|
CREATE TABLE `edge` (
|
|
|
|
`src` varbinary(64) NOT NULL,
|
|
|
|
`type` int(10) unsigned NOT NULL,
|
|
|
|
`dst` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`seq` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`src`,`type`,`dst`),
|
|
|
|
UNIQUE KEY `key_dst` (`dst`,`type`,`src`),
|
|
|
|
KEY `src` (`src`,`type`,`dateCreated`,`seq`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
2017-04-23 15:24:01 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `lisk_counter` (
|
|
|
|
`counterName` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`counterValue` bigint(20) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`counterName`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
INSERT INTO `lisk_counter` VALUES ('worker_activetask',5);
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_activetask` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
|
`taskClass` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`leaseOwner` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`leaseExpires` int(10) unsigned DEFAULT NULL,
|
|
|
|
`failureCount` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned NOT NULL,
|
|
|
|
`failureTime` int(10) unsigned DEFAULT NULL,
|
|
|
|
`priority` int(10) unsigned NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `leaseExpires` (`leaseExpires`),
|
|
|
|
KEY `key_failuretime` (`failureTime`),
|
|
|
|
KEY `taskClass` (`taskClass`),
|
|
|
|
KEY `key_owner` (`leaseOwner`,`priority`,`id`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
INSERT INTO `worker_activetask` VALUES (3,'PhabricatorRebuildIndexesWorker',NULL,NULL,0,1,NULL,3500,NULL,1556231702,1556231702),(4,'PhabricatorRebuildIndexesWorker',NULL,NULL,0,2,NULL,3500,NULL,1556231702,1556231702),(5,'PhabricatorRebuildIndexesWorker',NULL,NULL,0,3,NULL,3500,NULL,1556231702,1556231702);
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_archivetask` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
|
`taskClass` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`leaseOwner` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`leaseExpires` int(10) unsigned DEFAULT NULL,
|
|
|
|
`failureCount` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned NOT NULL,
|
|
|
|
`result` int(10) unsigned NOT NULL,
|
|
|
|
`duration` bigint(20) unsigned NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`priority` int(10) unsigned NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`archivedEpoch` int(10) unsigned DEFAULT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_modified` (`dateModified`),
|
2017-04-23 15:24:01 +02:00
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_bulkjob` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`jobTypeKey` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`size` int(10) unsigned NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`isSilent` tinyint(1) NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_type` (`jobTypeKey`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_status` (`status`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_bulkjobtransaction` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`commentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commentVersion` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`transactionType` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_bulktask` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`bulkJobPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
KEY `key_job` (`bulkJobPHID`,`status`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_taskdata` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`data` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
INSERT INTO `worker_taskdata` VALUES (1,'{\"queryClass\":\"PhabricatorDashboardQuery\"}'),(2,'{\"queryClass\":\"PhabricatorDashboardPanelQuery\"}'),(3,'{\"queryClass\":\"HeraldRuleQuery\"}');
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_trigger` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
`triggerVersion` int(10) unsigned NOT NULL,
|
|
|
|
`clockClass` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`clockProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`actionClass` varchar(64) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`actionProperties` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_trigger` (`triggerVersion`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET NAMES utf8 ;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `worker_triggerevent` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`triggerID` int(10) unsigned NOT NULL,
|
|
|
|
`lastEventEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`nextEventEpoch` int(10) unsigned DEFAULT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2019-04-26 00:34:42 +02:00
|
|
|
UNIQUE KEY `key_trigger` (`triggerID`),
|
|
|
|
KEY `key_next` (`nextEventEpoch`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_xhpast` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_xhpast`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `xhpast_parsetree` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`input` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`returnCode` int(10) NOT NULL,
|
|
|
|
`stdout` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`stderr` longtext CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} NOT NULL,
|
2017-04-23 15:24:01 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2019-04-26 00:34:42 +02:00
|
|
|
PRIMARY KEY (`id`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_xhprof` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2017-04-23 15:24:01 +02:00
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
USE `{$NAMESPACE}_xhprof`;
|
|
|
|
|
|
|
|
SET NAMES utf8 ;
|
|
|
|
|
|
|
|
SET character_set_client = {$CHARSET} ;
|
|
|
|
|
|
|
|
CREATE TABLE `xhprof_sample` (
|
2017-04-23 15:24:01 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2019-04-26 00:34:42 +02:00
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`sampleRate` int(10) unsigned NOT NULL,
|
|
|
|
`usTotal` bigint(20) unsigned NOT NULL,
|
|
|
|
`hostname` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`requestPath` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`controller` varchar(255) CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `filePHID` (`filePHID`)
|
2017-04-23 15:24:01 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|