2014-11-07 21:29:24 +01: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
|
|
|
USE `{$NAMESPACE}_audit`;
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `audit_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,
|
|
|
|
`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,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `audit_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,
|
|
|
|
`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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
2012-04-30 16:53:53 +02:00
|
|
|
`isNewFile` tinyint(1) NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`fixedState` varchar(12) 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`),
|
2014-11-07 21:29:24 +01: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`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_calendar` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
USE `{$NAMESPACE}_calendar`;
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `calendar_event` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateFrom` int(10) unsigned NOT NULL,
|
|
|
|
`dateTo` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`isCancelled` tinyint(1) NOT NULL,
|
|
|
|
`name` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`isAllDay` tinyint(1) NOT NULL,
|
|
|
|
`icon` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isRecurring` tinyint(1) NOT NULL,
|
|
|
|
`recurrenceFrequency` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`recurrenceEndDate` int(10) unsigned DEFAULT NULL,
|
|
|
|
`instanceOfEventPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`sequenceIndex` int(10) unsigned DEFAULT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_instance` (`instanceOfEventPHID`,`sequenceIndex`),
|
|
|
|
KEY `userPHID_dateFrom` (`userPHID`,`dateTo`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventinvitee` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`eventPHID` varbinary(64) NOT NULL,
|
|
|
|
`inviteePHID` varbinary(64) NOT NULL,
|
|
|
|
`inviterPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_event` (`eventPHID`,`inviteePHID`),
|
|
|
|
KEY `key_invitee` (`inviteePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventtransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `calendar_eventtransaction_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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`),
|
2015-09-29 22:27:33 +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
|
|
|
CREATE TABLE `calendar_holiday` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`day` date NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `day` (`day`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_chatlog` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_chatlog`;
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `chatlog_channel` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`serviceName` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`serviceType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`channelName` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_channel` (`channelName`,`serviceType`,`serviceName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `chatlog_event` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`author` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`type` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`message` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`loggedByPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`channelID` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `channel` (`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_conduit` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_conduit`;
|
|
|
|
|
|
|
|
CREATE TABLE `conduit_certificatetoken` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`token` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `userPHID` (`userPHID`),
|
|
|
|
UNIQUE KEY `token` (`token`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `conduit_connectionlog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`client` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`clientVersion` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`clientDescription` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`username` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT 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`),
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `conduit_methodcalllog` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`connectionID` bigint(20) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`method` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`error` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`duration` bigint(20) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`callerPHID` varbinary(64) DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_method` (`method`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_callermethod` (`callerPHID`,`method`),
|
|
|
|
KEY `key_date` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2015-01-23 01:10:26 +01:00
|
|
|
CREATE TABLE `conduit_token` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`token` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`expires` int(10) unsigned DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_token` (`token`),
|
|
|
|
KEY `key_object` (`objectPHID`,`tokenType`),
|
|
|
|
KEY `key_expires` (`expires`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01: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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_countdown`;
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `countdown` (
|
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,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01: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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `countdown_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) 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};
|
|
|
|
|
|
|
|
CREATE TABLE `countdown_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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 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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_daemon` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_daemon`;
|
|
|
|
|
|
|
|
CREATE TABLE `daemon_log` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`daemon` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`host` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`pid` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`argv` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`explicitArgv` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`status` varchar(8) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`runningAsUser` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`daemonID` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2015-03-02 18:57:38 +01:00
|
|
|
UNIQUE KEY `key_daemonID` (`daemonID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `status` (`status`),
|
|
|
|
KEY `dateCreated` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `daemon_logevent` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`logID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`logType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`message` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `logID` (`logID`,`epoch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_differential` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_differential`;
|
|
|
|
|
|
|
|
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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_changeset` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`diffID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`oldFile` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`filename` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`awayPaths` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`changeType` int(10) unsigned NOT NULL,
|
|
|
|
`fileType` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`oldProperties` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`newProperties` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`addLines` int(10) unsigned NOT NULL,
|
|
|
|
`delLines` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `diffID` (`diffID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_changeset_parse_cache` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`cache` longblob NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_commit` (
|
|
|
|
`revisionID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`commitPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `differential_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `differential_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `differential_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_diff` (
|
|
|
|
`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
|
|
|
`revisionID` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`sourceMachine` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourcePath` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlSystem` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlBaseRevision` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`sourceControlPath` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`lintStatus` int(10) unsigned NOT NULL,
|
|
|
|
`unitStatus` int(10) unsigned NOT NULL,
|
|
|
|
`lineCount` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`branch` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`bookmark` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`creationMethod` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`description` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`repositoryUUID` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`viewPolicy` 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`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `revisionID` (`revisionID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_diffproperty` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`diffID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` 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`),
|
|
|
|
UNIQUE KEY `diffID` (`diffID`,`name`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2015-01-23 01:10:26 +01:00
|
|
|
CREATE TABLE `differential_difftransaction` (
|
|
|
|
`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-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `differential_draft` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`draftKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_unique` (`objectPHID`,`authorPHID`,`draftKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `differential_hiddencomment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`commentID` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_user` (`userPHID`,`commentID`),
|
|
|
|
KEY `key_comment` (`commentID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_hunk` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`changesetID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`changes` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`oldOffset` int(10) unsigned NOT NULL,
|
|
|
|
`oldLen` int(10) unsigned NOT NULL,
|
|
|
|
`newOffset` int(10) unsigned NOT NULL,
|
|
|
|
`newLen` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `changesetID` (`changesetID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `differential_hunk_modern` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`changesetID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`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) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dataFormat` binary(4) NOT NULL,
|
|
|
|
`data` longblob 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-11-07 21:29:24 +01:00
|
|
|
KEY `key_changeset` (`changesetID`),
|
|
|
|
KEY `key_created` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_revision` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`originalTitle` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`summary` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`testPlan` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`lastReviewerPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`lineCount` int(10) unsigned DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`attached` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(40) NOT NULL,
|
|
|
|
`branchName` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `authorPHID` (`authorPHID`,`status`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `repositoryPHID` (`repositoryPHID`),
|
|
|
|
KEY `key_status` (`status`,`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `differential_revisionhash` (
|
|
|
|
`revisionID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`type` binary(4) NOT NULL,
|
|
|
|
`hash` binary(40) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `type` (`type`,`hash`),
|
|
|
|
KEY `revisionID` (`revisionID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `differential_transaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `differential_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`revisionPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`changesetID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isNewFile` tinyint(1) NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`fixedState` varchar(12) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`hasReplies` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`replyToCommentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
KEY `key_changeset` (`changesetID`),
|
|
|
|
KEY `key_draft` (`authorPHID`,`transactionPHID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_revision` (`revisionPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
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-01-18 01:11:16 +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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_draft` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_draft`;
|
|
|
|
|
|
|
|
CREATE TABLE `draft` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`draftKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`draft` 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`),
|
|
|
|
UNIQUE KEY `authorPHID` (`authorPHID`,`draftKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `draft_versioneddraft` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`version` int(10) unsigned NOT NULL,
|
|
|
|
`properties` longtext 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`,`authorPHID`,`version`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_drydock` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_drydock`;
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `drydock_authorization` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`blueprintPHID` varbinary(64) NOT NULL,
|
|
|
|
`blueprintAuthorizationState` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectAuthorizationState` varchar(32) 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_unique` (`objectPHID`,`blueprintPHID`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`blueprintAuthorizationState`),
|
|
|
|
KEY `key_object` (`objectPHID`,`objectAuthorizationState`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `drydock_blueprint` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`blueprintName` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`details` 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,
|
2015-09-29 22:27:33 +02:00
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `drydock_blueprinttransaction` (
|
|
|
|
`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
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `drydock_command` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`targetPHID` varbinary(64) NOT NULL,
|
|
|
|
`command` varchar(32) 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_target` (`targetPHID`,`isConsumed`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `drydock_lease` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`until` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`attributes` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`resourceType` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`resourcePHID` varbinary(64) DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`authorizingPHID` varbinary(64) 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`),
|
|
|
|
KEY `key_resource` (`resourcePHID`,`status`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `drydock_log` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`blueprintPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`resourcePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`leasePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`type` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2016-01-19 18:56:48 +01:00
|
|
|
KEY `epoch` (`epoch`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`type`),
|
|
|
|
KEY `key_resource` (`resourcePHID`,`type`),
|
|
|
|
KEY `key_lease` (`leasePHID`,`type`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_repositoryoperation` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryTarget` longblob NOT NULL,
|
|
|
|
`operationType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`operationState` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isDismissed` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_object` (`objectPHID`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`,`operationState`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `drydock_resource` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`type` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`attributes` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`capabilities` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`blueprintPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`until` int(10) unsigned DEFAULT 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`),
|
|
|
|
KEY `key_type` (`type`,`status`),
|
|
|
|
KEY `key_blueprint` (`blueprintPHID`,`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `drydock_slotlock` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`lockIndex` binary(12) NOT NULL,
|
|
|
|
`lockKey` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_feed` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_feed`;
|
|
|
|
|
|
|
|
CREATE TABLE `feed_storydata` (
|
|
|
|
`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
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`storyType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storyData` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) 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`),
|
|
|
|
UNIQUE KEY `chronologicalKey` (`chronologicalKey`),
|
|
|
|
UNIQUE 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
|
|
|
|
|
|
|
CREATE TABLE `feed_storynotification` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`primaryObjectPHID` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
|
|
|
`hasViewed` tinyint(1) NOT NULL,
|
|
|
|
UNIQUE KEY `userPHID` (`userPHID`,`chronologicalKey`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `userPHID_2` (`userPHID`,`hasViewed`,`primaryObjectPHID`),
|
|
|
|
KEY `key_object` (`primaryObjectPHID`),
|
|
|
|
KEY `key_chronological` (`chronologicalKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `feed_storyreference` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`chronologicalKey` bigint(20) unsigned NOT NULL,
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`chronologicalKey`),
|
|
|
|
KEY `chronologicalKey` (`chronologicalKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_file` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_file`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `file` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`mimeType` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`byteSize` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`storageEngine` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storageFormat` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`storageHandle` varchar(255) 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`secretKey` binary(20) DEFAULT NULL,
|
|
|
|
`contentHash` binary(40) DEFAULT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`ttl` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isExplicitUpload` tinyint(1) DEFAULT '1',
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`isPartial` tinyint(1) NOT NULL DEFAULT '0',
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `contentHash` (`contentHash`),
|
|
|
|
KEY `key_ttl` (`ttl`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_partial` (`authorPHID`,`isPartial`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `file_imagemacro` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) 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,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`audioPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`audioBehavior` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2013-01-17 01:42:41 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `name` (`name`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_disabled` (`isDisabled`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `file_transaction` (
|
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,
|
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,
|
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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `file_transaction_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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `file_transformedfile` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`originalPHID` varbinary(64) NOT NULL,
|
|
|
|
`transform` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`transformedPHID` varbinary(64) 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 `originalPHID` (`originalPHID`,`transform`),
|
|
|
|
KEY `transformedPHID` (`transformedPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `macro_transaction` (
|
|
|
|
`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,
|
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
|
|
|
`metadata` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `macro_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_flag` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_flag`;
|
|
|
|
|
|
|
|
CREATE TABLE `flag` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`reasonPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`color` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`note` 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 `ownerPHID` (`ownerPHID`,`type`,`objectPHID`),
|
|
|
|
KEY `objectPHID` (`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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_harbormaster` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
USE `{$NAMESPACE}_harbormaster`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `harbormaster_build` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildablePHID` varbinary(64) NOT NULL,
|
|
|
|
`buildPlanPHID` varbinary(64) NOT NULL,
|
|
|
|
`buildStatus` varchar(32) 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
|
|
|
`buildGeneration` int(10) unsigned NOT NULL DEFAULT '0',
|
2015-09-29 22:27:33 +02:00
|
|
|
`planAutoKey` varchar(32) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`buildParameters` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`initiatorPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_planautokey` (`buildablePHID`,`planAutoKey`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_buildable` (`buildablePHID`),
|
|
|
|
KEY `key_plan` (`buildPlanPHID`),
|
|
|
|
KEY `key_status` (`buildStatus`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildable` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildablePHID` varbinary(64) NOT NULL,
|
|
|
|
`containerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`buildableStatus` varchar(32) 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,
|
|
|
|
`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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
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) 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
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildartifact` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-09-29 22:27:33 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`artifactType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`artifactIndex` binary(12) NOT NULL,
|
|
|
|
`artifactKey` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`artifactData` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_artifact` (`artifactType`,`artifactIndex`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_garbagecollect` (`artifactType`,`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
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildcommand` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`targetPHID` varbinary(64) NOT NULL,
|
|
|
|
`command` varchar(128) 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`),
|
|
|
|
KEY `key_target` (`targetPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
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) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`severity` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` longtext 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};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `harbormaster_buildlog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`logSource` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`logType` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`duration` int(10) unsigned DEFAULT NULL,
|
|
|
|
`live` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`buildTargetPHID` varbinary(64) NOT 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`),
|
|
|
|
KEY `key_buildtarget` (`buildTargetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildlogchunk` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`logID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`encoding` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`size` int(10) unsigned DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`chunk` longblob NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_log` (`logID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `harbormaster_buildmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(16) 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_buildtarget` (`buildTargetPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildplan` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`planStatus` varchar(32) 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,
|
2015-09-29 22:27:33 +02:00
|
|
|
`planAutoKey` varchar(32) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_planautokey` (`planAutoKey`),
|
|
|
|
KEY `key_status` (`planStatus`),
|
|
|
|
KEY `key_name` (`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
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildplantransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildstep` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildPlanPHID` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` 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,
|
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`stepAutoKey` varchar(32) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
UNIQUE KEY `key_stepautokey` (`buildPlanPHID`,`stepAutoKey`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_plan` (`buildPlanPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
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) 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
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_buildtarget` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`buildPHID` varbinary(64) NOT NULL,
|
|
|
|
`buildStepPHID` varbinary(64) NOT NULL,
|
|
|
|
`className` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`variables` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`targetStatus` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) 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',
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_build` (`buildPHID`,`buildStepPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
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) 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
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `harbormaster_buildunitmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`buildTargetPHID` varbinary(64) NOT NULL,
|
|
|
|
`engine` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`namespace` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`result` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`duration` double DEFAULT NULL,
|
|
|
|
`properties` longtext 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};
|
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
CREATE TABLE `harbormaster_object` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2013-01-17 01:42:41 +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`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `harbormaster_scratchtable` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` varchar(64) 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`bigData` longtext COLLATE {$COLLATE_TEXT},
|
2015-03-02 18:57:38 +01:00
|
|
|
`nonmutableData` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `data` (`data`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `lisk_counter` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`counterName` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`counterValue` bigint(20) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`counterName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_herald` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_herald`;
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_action` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`action` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`target` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `ruleID` (`ruleID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_condition` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`fieldName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`fieldCondition` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`value` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `ruleID` (`ruleID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_rule` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`contentType` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`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` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`ruleType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isDisabled` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`triggerObjectPHID` varbinary(64) DEFAULT 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`),
|
|
|
|
KEY `key_trigger` (`triggerObjectPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_ruletype` (`ruleType`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_ruleapplied` (
|
|
|
|
`ruleID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`ruleID`,`phid`),
|
|
|
|
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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `herald_ruletransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `herald_ruletransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_savedheader` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`header` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `herald_transcript` (
|
|
|
|
`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
|
|
|
`time` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`host` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`duration` double NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dryRun` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectTranscript` longblob NOT NULL,
|
|
|
|
`ruleTranscripts` longblob NOT NULL,
|
|
|
|
`conditionTranscripts` longblob NOT NULL,
|
|
|
|
`applyTranscripts` longblob NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`garbageCollected` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `objectPHID` (`objectPHID`),
|
|
|
|
KEY `garbageCollected` (`garbageCollected`,`time`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_maniphest` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_maniphest`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `maniphest_customfieldnumericindex` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `maniphest_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `maniphest_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `maniphest_nameindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`indexedObjectPHID` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`indexedObjectName` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} 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` (`indexedObjectPHID`),
|
|
|
|
KEY `key_name` (`indexedObjectName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `maniphest_task` (
|
|
|
|
`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,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`attached` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(12) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`priority` int(10) unsigned NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`title` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`originalTitle` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`projectPHIDs` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`ownerOrdering` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`originalEmailSource` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`subpriority` double NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `priority` (`priority`,`status`),
|
|
|
|
KEY `status` (`status`),
|
|
|
|
KEY `ownerPHID` (`ownerPHID`,`status`),
|
|
|
|
KEY `authorPHID` (`authorPHID`,`status`),
|
|
|
|
KEY `ownerOrdering` (`ownerOrdering`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `priority_2` (`priority`,`subpriority`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
|
|
|
KEY `key_dateModified` (`dateModified`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_title` (`title`(64)),
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `maniphest_transaction` (
|
|
|
|
`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,
|
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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `maniphest_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_meta_data` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_meta_data`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
CREATE TABLE `patch_status` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`patch` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`applied` int(10) unsigned NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`duration` bigint(20) unsigned DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`patch`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
INSERT INTO `patch_status` VALUES ('phabricator:000.project.sql',1453226118,NULL),('phabricator:0000.legacy.sql',1453226118,NULL),('phabricator:001.maniphest_projects.sql',1453226118,NULL),('phabricator:002.oauth.sql',1453226118,NULL),('phabricator:003.more_oauth.sql',1453226118,NULL),('phabricator:004.daemonrepos.sql',1453226118,NULL),('phabricator:005.workers.sql',1453226118,NULL),('phabricator:006.repository.sql',1453226118,NULL),('phabricator:007.daemonlog.sql',1453226118,NULL),('phabricator:008.repoopt.sql',1453226118,NULL),('phabricator:009.repo_summary.sql',1453226118,NULL),('phabricator:010.herald.sql',1453226118,NULL),('phabricator:011.badcommit.sql',1453226118,NULL),('phabricator:012.dropphidtype.sql',1453226118,NULL),('phabricator:013.commitdetail.sql',1453226118,NULL),('phabricator:014.shortcuts.sql',1453226118,NULL),('phabricator:015.preferences.sql',1453226118,NULL),('phabricator:016.userrealnameindex.sql',1453226118,NULL),('phabricator:017.sessionkeys.sql',1453226118,NULL),('phabricator:018.owners.sql',1453226118,NULL),('phabricator:019.arcprojects.sql',1453226118,NULL),('phabricator:020.pathcapital.sql',1453226118,NULL),('phabricator:021.xhpastview.sql',1453226118,NULL),('phabricator:022.differentialcommit.sql',1453226118,NULL),('phabricator:023.dxkeys.sql',1453226118,NULL),('phabricator:024.mlistkeys.sql',1453226118,NULL),('phabricator:025.commentopt.sql',1453226118,NULL),('phabricator:026.diffpropkey.sql',1453226118,NULL),('phabricator:027.metamtakeys.sql',1453226118,NULL),('phabricator:028.systemagent.sql',1453226118,NULL),('phabricator:029.cursors.sql',1453226118,NULL),('phabricator:030.imagemacro.sql',1453226118,NULL),('phabricator:031.workerrace.sql',1453226118,NULL),('phabricator:032.viewtime.sql',1453226118,NULL),('phabricator:033.privtest.sql',1453226118,NULL),('phabricator:034.savedheader.sql',1453226118,NULL),('phabricator:035.proxyimage.sql',1453226118,NULL),('phabricator:036.mailkey.sql',1453226119,NULL),('phabricator:037.setuptest.sql',1453226119,NULL),('phabricator:038.admin.sql',1453226119,NULL),('phabricator:039.userlog.sql',1453226119,NULL),('phabricator:040.transform.sql',1453226119,NULL),('phabricator:041.heraldrepetition.sql',1453226119,NULL),('phabricator:042.commentmetadata.sql',1453226119,NULL),('phabricator:043.pastebin.sql',1453226119,NULL),('phabricator:044.countdown.sql',1453226119,NULL),('phabricator:045.timezone.sql',1453226119,NULL),('phabricator:046.conduittoken.sql',1453226119,NULL),('phabricator:047.projectstatus.sql',1453226119,NULL),('phabricator:048.relationshipkeys.sql',1453226119,NULL),('phabricator:049.projectowner.sql',1453226119,NULL),('phabricator:050.taskdenormal.sql',1453226119,NULL),('phabricator:051.projectfilter.sql',1453226119,NULL),('phabricator:052.pastelanguage.sql',1453226119,NULL),('phabricator:053.feed.sql',1453226119,NULL),('phabricator:054.subscribers.sql',1453226119,NULL),('phabricator:055.add_author_to_files.sql',1453226119,NULL),('phabricator:056.slowvote.sql',1453226119,NULL),('phabricator:057.parsecache.sql',1453226119,NULL),('phabricator:058.missingkeys.sql',1453226119,NULL),('phabricator:059.engines.php',1453226120,NULL),('phabricator:060.phriction.sql',1453226120,NULL),('phabricator:061.phrictioncontent.sql',1453226120,NULL),('phabricator:062.phrictionmenu.sql',1453226120,NULL),('phabricator:063.pasteforks.sql',1453226120,NULL),('phabricator:064.subprojects.sql',1453226120,NULL),('phabricator:065.sshkeys.sql',1453226120,NULL),('phabricator:066.phrictioncontent.sql',1453226120,NULL),('phabricator:067.preferences.sql',1453226120,NULL),('phabricator:068.maniphestauxiliarystorage.sql',1453226120,NULL),('phabricator:069.heraldxscript.sql',1453226120,NULL),('phabricator:070.differentialaux.sql',1453226120,NULL),('phabricator:071.contentsource.sql',1453226120,NULL),('phabricator:072.blamerevert.sql',1453226120,NULL),('phabricator:073.reposymbols.sql',1453226120,NULL),('phabricator:074.affectedpath.sql',1453226120,NULL),('phabricator:075.revisionhash.sql',1453226120,NULL),('phabricator:076.indexedlanguages.sql',1453226120,NULL),('phabricator:077.or
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_metamta` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_metamta`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2015-01-23 01:10:26 +01:00
|
|
|
CREATE TABLE `metamta_applicationemail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`applicationPHID` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`address` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`configData` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_address` (`address`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_application` (`applicationPHID`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2015-01-23 01:10:26 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
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) 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};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `metamta_mail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-09-29 22:27:33 +02:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`actorPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`parameters` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`message` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`relatedPHID` varbinary(64) DEFAULT 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`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `relatedPHID` (`relatedPHID`),
|
|
|
|
KEY `key_created` (`dateCreated`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_actorPHID` (`actorPHID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `status` (`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `metamta_receivedmail` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`headers` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`bodies` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`attachments` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`relatedPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`message` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`messageIDHash` binary(12) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `relatedPHID` (`relatedPHID`),
|
2013-01-17 01:42:41 +01:00
|
|
|
KEY `authorPHID` (`authorPHID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_messageIDHash` (`messageIDHash`),
|
|
|
|
KEY `key_created` (`dateCreated`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `sms` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`providerShortName` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerSMSID` varchar(40) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`toNumber` varchar(20) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`fromNumber` varchar(20) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`body` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sendStatus` varchar(16) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_provider` (`providerSMSID`,`providerShortName`)
|
|
|
|
) 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} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_oauth_server`;
|
|
|
|
|
|
|
|
CREATE TABLE `oauth_server_oauthclientauthorization` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientPHID` 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-11-07 21:29:24 +01:00
|
|
|
`scope` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `userPHID` (`userPHID`,`clientPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `oauth_server_oauthserveraccesstoken` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`token` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientPHID` varbinary(64) 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`),
|
|
|
|
UNIQUE KEY `token` (`token`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `oauth_server_oauthserverauthorizationcode` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`code` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`clientPHID` varbinary(64) NOT NULL,
|
|
|
|
`clientSecret` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userPHID` 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-11-07 21:29:24 +01:00
|
|
|
`redirectURI` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `code` (`code`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `oauth_server_oauthserverclient` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`secret` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`redirectURI` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`isTrusted` tinyint(1) NOT NULL DEFAULT '0',
|
2015-01-23 01:10:26 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) 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`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `creatorPHID` (`creatorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_owners` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_owners`;
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `owners_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `owners_name_ngrams` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectID` int(10) unsigned NOT NULL,
|
|
|
|
`ngram` char(3) 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};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `owners_owner` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`packageID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `packageID` (`packageID`,`userPHID`),
|
|
|
|
KEY `userPHID` (`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `owners_package` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`originalName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`primaryOwnerPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`auditingEnabled` tinyint(1) NOT NULL DEFAULT '0',
|
2015-09-29 22:27:33 +02:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2016-01-19 18:56:48 +01: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
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `owners_packagetransaction` (
|
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,
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `owners_path` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`packageID` int(10) unsigned NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`path` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`excluded` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `packageID` (`packageID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_pastebin` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pastebin`;
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `pastebin_paste` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` 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-11-07 21:29:24 +01:00
|
|
|
`language` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parentPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`viewPolicy` varbinary(64) DEFAULT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} 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`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `parentPHID` (`parentPHID`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `authorPHID` (`authorPHID`),
|
|
|
|
KEY `key_dateCreated` (`dateCreated`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_language` (`language`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `pastebin_pastetransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `pastebin_pastetransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
|
|
|
`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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phame` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phame`;
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `phame_blog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`domain` varchar(128) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`configData` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) DEFAULT NULL,
|
|
|
|
`editPolicy` varbinary(64) DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `domain` (`domain`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
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) 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};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `phame_post` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`bloggerPHID` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`phameTitle` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`body` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`visibility` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`configData` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`datePublished` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`blogPHID` varbinary(64) DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `bloggerPosts` (`bloggerPHID`,`visibility`,`datePublished`,`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
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) 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};
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `phame_posttransaction_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phriction` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
USE `{$NAMESPACE}_phriction`;
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `phriction_content` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`documentID` int(10) unsigned NOT NULL,
|
|
|
|
`version` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`title` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`slug` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`content` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
`changeType` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`changeRef` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `documentID` (`documentID`,`version`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `slug` (`slug`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `phriction_document` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`slug` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`depth` int(10) unsigned NOT NULL,
|
|
|
|
`contentID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`status` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `slug` (`slug`),
|
|
|
|
UNIQUE KEY `depth` (`depth`,`slug`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_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) 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};
|
|
|
|
|
|
|
|
CREATE TABLE `phriction_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_project` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_project`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `project` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2015-03-02 18:57:38 +01:00
|
|
|
`name` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` 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-11-07 21:29:24 +01:00
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`joinPolicy` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`isMembershipLocked` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`icon` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`color` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`primarySlug` varchar(128) 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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_pathkey` (`projectPathKey`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_primaryslug` (`primarySlug`),
|
|
|
|
UNIQUE KEY `key_milestone` (`parentProjectPHID`,`milestoneNumber`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_icon` (`icon`),
|
2016-01-19 18:56:48 +01:00
|
|
|
KEY `key_color` (`color`),
|
|
|
|
KEY `key_path` (`projectPath`,`projectDepth`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `project_column` (
|
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,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` int(10) unsigned NOT NULL,
|
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
|
|
|
`projectPHID` 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-11-07 21:29:24 +01:00
|
|
|
`properties` longtext COLLATE {$COLLATE_TEXT} 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`),
|
|
|
|
KEY `key_status` (`projectPHID`,`status`,`sequence`),
|
|
|
|
KEY `key_sequence` (`projectPHID`,`sequence`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `project_columnposition` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`boardPHID` varbinary(64) NOT NULL,
|
|
|
|
`columnPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `boardPHID` (`boardPHID`,`columnPHID`,`objectPHID`),
|
|
|
|
KEY `objectPHID` (`objectPHID`,`boardPHID`),
|
|
|
|
KEY `boardPHID_2` (`boardPHID`,`columnPHID`,`sequence`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `project_columntransaction` (
|
|
|
|
`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,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `project_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `project_datasourcetoken` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`projectID` int(10) unsigned NOT NULL,
|
|
|
|
`token` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `token` (`token`,`projectID`),
|
|
|
|
KEY `projectID` (`projectID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `project_slug` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`projectPHID` varbinary(64) NOT NULL,
|
|
|
|
`slug` varchar(128) 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-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_slug` (`slug`),
|
|
|
|
KEY `key_projectPHID` (`projectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `project_transaction` (
|
|
|
|
`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,
|
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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_repository` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_repository`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`name` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
|
|
|
`callsign` varchar(32) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`versionControlSystem` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`uuid` varchar(64) 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,
|
2015-01-23 01:10:26 +01:00
|
|
|
`almanacServicePHID` varbinary(64) DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`repositorySlug` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `callsign` (`callsign`),
|
2016-01-19 18:56:48 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_slug` (`repositorySlug`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_vcs` (`versionControlSystem`),
|
2015-09-29 22:27:33 +02:00
|
|
|
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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_auditrequest` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`auditorPHID` varbinary(64) NOT NULL,
|
|
|
|
`commitPHID` varbinary(64) NOT NULL,
|
|
|
|
`auditStatus` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`auditReasons` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2015-01-23 01:10:26 +01:00
|
|
|
UNIQUE KEY `key_unique` (`commitPHID`,`auditorPHID`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `commitPHID` (`commitPHID`),
|
|
|
|
KEY `auditorPHID` (`auditorPHID`,`auditStatus`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_badcommit` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`fullCommitName` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`fullCommitName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `repository_branch` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lintCommit` varchar(40) COLLATE {$COLLATE_TEXT} DEFAULT 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 `repositoryID` (`repositoryID`,`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_commit` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`commitIdentifier` varchar(40) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`auditStatus` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`summary` varchar(80) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`importStatus` int(10) unsigned NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `key_commit_identity` (`commitIdentifier`,`repositoryID`),
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `repositoryID_2` (`repositoryID`,`epoch`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `authorPHID` (`authorPHID`,`auditStatus`,`epoch`),
|
2015-09-29 22:27:33 +02:00
|
|
|
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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_commitdata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`commitID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorName` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`commitMessage` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`commitDetails` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `commitID` (`commitID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
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`),
|
2016-01-19 18:56:48 +01:00
|
|
|
UNIQUE KEY `key_path` (`branchID`,`pathID`,`commitID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `repository_lintmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`branchID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`path` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`line` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`code` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`severity` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `branchID` (`branchID`,`path`(64)),
|
2014-01-18 01:11:16 +01:00
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `repository_mirror` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`remoteURI` varchar(255) 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`),
|
|
|
|
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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `repository_parents` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`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`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_path` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`path` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`pathHash` binary(32) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `pathHash` (`pathHash`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `repository_pushevent` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
`pusherPHID` varbinary(64) NOT NULL,
|
|
|
|
`remoteAddress` int(10) unsigned DEFAULT NULL,
|
|
|
|
`remoteProtocol` varchar(32) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`rejectCode` int(10) unsigned NOT NULL,
|
|
|
|
`rejectDetails` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `repository_pushlog` (
|
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,
|
2014-01-18 01:11:16 +01:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`pushEventPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`pusherPHID` varbinary(64) NOT NULL,
|
|
|
|
`refType` varchar(12) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refNameHash` binary(12) DEFAULT NULL,
|
|
|
|
`refNameRaw` longblob,
|
|
|
|
`refNameEncoding` varchar(16) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`refOld` varchar(40) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`refNew` varchar(40) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mergeBase` varchar(40) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`changeFlags` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_ref` (`repositoryPHID`,`refNew`),
|
|
|
|
KEY `key_pusher` (`pusherPHID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_name` (`repositoryPHID`,`refNameHash`),
|
|
|
|
KEY `key_event` (`pushEventPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `repository_refcursor` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2016-01-19 18:56:48 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`refType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refNameHash` binary(12) NOT NULL,
|
|
|
|
`refNameRaw` longblob NOT NULL,
|
|
|
|
`refNameEncoding` varchar(16) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`commitIdentifier` varchar(40) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`isClosed` tinyint(1) NOT 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`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `key_cursor` (`repositoryPHID`,`refType`,`refNameHash`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `repository_statusmessage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`statusType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`statusCode` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `repositoryID` (`repositoryID`,`statusType`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
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,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`repositoryID`),
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `repository_symbol` (
|
2015-09-29 22:27:33 +02:00
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`symbolContext` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolName` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolType` varchar(12) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`symbolLanguage` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`pathID` int(10) unsigned NOT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
KEY `symbolName` (`symbolName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `repository_transaction` (
|
|
|
|
`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,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` 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
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `repository_uriindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`repositoryURI` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_repository` (`repositoryPHID`),
|
|
|
|
KEY `key_uri` (`repositoryURI`(128))
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `repository_vcspassword` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`passwordHash` varchar(128) 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` (`userPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01: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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_search`;
|
|
|
|
|
|
|
|
CREATE TABLE `search_document` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`documentType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`documentTitle` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`documentCreated` int(10) unsigned NOT NULL,
|
|
|
|
`documentModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`phid`),
|
|
|
|
KEY `documentCreated` (`documentCreated`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `search_documentfield` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`phidType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`field` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`auxPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} COLLATE {$COLLATE_FULLTEXT},
|
2012-04-30 16:53:53 +02:00
|
|
|
KEY `phid` (`phid`),
|
|
|
|
FULLTEXT KEY `corpus` (`corpus`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `search_documentrelationship` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`relatedPHID` varbinary(64) NOT NULL,
|
|
|
|
`relation` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`relatedType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `search_editengineconfiguration` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`engineKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinKey` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`properties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isDisabled` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDefault` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isEdit` tinyint(1) NOT NULL,
|
|
|
|
`createOrder` int(10) unsigned NOT NULL,
|
|
|
|
`editOrder` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_engine` (`engineKey`,`builtinKey`),
|
|
|
|
KEY `key_default` (`engineKey`,`isDefault`,`isDisabled`),
|
|
|
|
KEY `key_edit` (`engineKey`,`isEdit`,`isDisabled`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `search_editengineconfigurationtransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `search_indexversion` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`extensionKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`version` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_object` (`objectPHID`,`extensionKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `search_namedquery` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`engineClassName` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`queryName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`queryKey` varchar(12) 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,
|
|
|
|
`isBuiltin` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDisabled` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`sequence` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_userquery` (`userPHID`,`engineClassName`,`queryKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `search_profilepanelconfiguration` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`profilePHID` varbinary(64) NOT NULL,
|
|
|
|
`panelKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`builtinKey` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`panelOrder` int(10) unsigned DEFAULT NULL,
|
|
|
|
`visibility` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`panelProperties` 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_profile` (`profilePHID`,`panelOrder`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `search_profilepanelconfigurationtransaction` (
|
|
|
|
`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
|
|
|
CREATE TABLE `search_savedquery` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`engineClassName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`queryKey` varchar(12) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_queryKey` (`queryKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_slowvote` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_slowvote`;
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `slowvote_choice` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`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,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `pollID` (`pollID`),
|
|
|
|
KEY `authorPHID` (`authorPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `slowvote_option` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`pollID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(255) 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`),
|
|
|
|
KEY `pollID` (`pollID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `slowvote_poll` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`question` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`responseVisibility` int(10) unsigned NOT NULL,
|
|
|
|
`shuffle` int(10) unsigned NOT NULL,
|
|
|
|
`method` int(10) unsigned NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isClosed` tinyint(1) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT 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 `phid` (`phid`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `slowvote_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,
|
|
|
|
`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,
|
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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `slowvote_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,
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_user` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_user`;
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `phabricator_session` (
|
2014-01-18 01:11:16 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`type` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sessionKey` binary(40) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`sessionStart` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`sessionExpires` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`highSecurityUntil` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isPartial` tinyint(1) NOT NULL DEFAULT '0',
|
2015-03-02 18:57:38 +01:00
|
|
|
`signedLegalpadDocuments` tinyint(1) NOT NULL DEFAULT '0',
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `sessionKey` (`sessionKey`),
|
|
|
|
KEY `key_identity` (`userPHID`,`type`),
|
|
|
|
KEY `key_expires` (`sessionExpires`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `user` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`userName` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`realName` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`sex` varchar(4) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`translation` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`passwordSalt` varchar(32) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`passwordHash` varchar(128) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`consoleEnabled` tinyint(1) NOT NULL,
|
|
|
|
`consoleVisible` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`consoleTab` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`conduitCertificate` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`isSystemAgent` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isDisabled` tinyint(1) NOT NULL,
|
|
|
|
`isAdmin` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`timezoneIdentifier` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isEmailVerified` int(10) unsigned NOT NULL,
|
|
|
|
`isApproved` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`accountSecret` binary(64) NOT NULL,
|
|
|
|
`isEnrolledInMultiFactor` tinyint(1) NOT NULL DEFAULT '0',
|
2015-09-29 22:27:33 +02:00
|
|
|
`profileImageCache` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`availabilityCache` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`availabilityCacheTTL` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isMailingList` tinyint(1) NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `userName` (`userName`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `realName` (`realName`),
|
|
|
|
KEY `key_approved` (`isApproved`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2015-03-02 18:57:38 +01:00
|
|
|
CREATE TABLE `user_authinvite` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_address` (`emailAddress`),
|
|
|
|
UNIQUE KEY `key_code` (`verificationHash`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `user_configuredcustomfieldstorage` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `user_customfieldnumericindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`indexValue` bigint(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `user_customfieldstringindex` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`indexKey` binary(12) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`indexValue` longtext CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `user_email` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`address` varchar(128) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`isVerified` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`isPrimary` tinyint(1) NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`verificationCode` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT 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 `address` (`address`),
|
|
|
|
KEY `userPHID` (`userPHID`,`isPrimary`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `user_externalaccount` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`accountType` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountDomain` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountSecret` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`accountID` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`displayName` varchar(255) 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`username` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`realName` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`email` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`emailVerified` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`accountURI` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `account_details` (`accountType`,`accountDomain`,`accountID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `user_log` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`actorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`action` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`oldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`newValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`details` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`remoteAddr` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`session` binary(40) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `actorPHID` (`actorPHID`,`dateCreated`),
|
|
|
|
KEY `userPHID` (`userPHID`,`dateCreated`),
|
|
|
|
KEY `action` (`action`,`dateCreated`),
|
|
|
|
KEY `dateCreated` (`dateCreated`),
|
|
|
|
KEY `remoteAddr` (`remoteAddr`,`dateCreated`),
|
|
|
|
KEY `session` (`session`,`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `user_nametoken` (
|
2015-03-02 18:57:38 +01:00
|
|
|
`token` varchar(255) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`userID` int(10) unsigned NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
KEY `token` (`token`(128)),
|
|
|
|
KEY `userID` (`userID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `user_preferences` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`preferences` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `userPHID` (`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
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `user_profile` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`blurb` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`profileImagePHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `userPHID` (`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
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `user_transaction` (
|
|
|
|
`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,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_worker` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
USE `{$NAMESPACE}_worker`;
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2013-01-17 01:42:41 +01:00
|
|
|
CREATE TABLE `lisk_counter` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`counterName` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`counterValue` bigint(20) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`counterName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
INSERT INTO `lisk_counter` VALUES ('worker_activetask',2);
|
2013-01-17 01:42:41 +01:00
|
|
|
|
|
|
|
CREATE TABLE `worker_activetask` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`taskClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`leaseOwner` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
`leaseExpires` int(10) unsigned DEFAULT NULL,
|
|
|
|
`failureCount` int(10) unsigned NOT NULL,
|
|
|
|
`dataID` int(10) unsigned DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`failureTime` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`priority` int(10) unsigned NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
2012-04-30 16:53:53 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `dataID` (`dataID`),
|
|
|
|
KEY `leaseExpires` (`leaseExpires`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `leaseOwner` (`leaseOwner`(16)),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_failuretime` (`failureTime`),
|
|
|
|
KEY `taskClass` (`taskClass`),
|
2015-01-23 01:10:26 +01:00
|
|
|
KEY `leaseOwner_2` (`leaseOwner`,`priority`,`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `worker_archivetask` (
|
|
|
|
`id` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`taskClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`leaseOwner` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
`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,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`priority` int(10) unsigned NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
2013-01-17 01:42:41 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `dateCreated` (`dateCreated`),
|
2015-01-23 01:10:26 +01:00
|
|
|
KEY `leaseOwner` (`leaseOwner`,`priority`,`id`),
|
|
|
|
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
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `worker_bulkjob` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`jobTypeKey` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`parameters` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`size` 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_type` (`jobTypeKey`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_status` (`status`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `worker_bulkjobtransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `worker_bulktask` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`bulkJobPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_job` (`bulkJobPHID`,`status`),
|
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE `worker_taskdata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2015-01-23 01:10:26 +01:00
|
|
|
CREATE TABLE `worker_trigger` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`triggerVersion` int(10) unsigned NOT NULL,
|
|
|
|
`clockClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`clockProperties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`actionClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`actionProperties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_trigger` (`triggerVersion`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `worker_triggerevent` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`triggerID` int(10) unsigned NOT NULL,
|
|
|
|
`lastEventEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
`nextEventEpoch` int(10) unsigned DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_trigger` (`triggerID`),
|
|
|
|
KEY `key_next` (`nextEventEpoch`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_xhpast` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
USE `{$NAMESPACE}_xhpast`;
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2016-01-19 18:56:48 +01:00
|
|
|
CREATE TABLE `xhpast_parsetree` (
|
2012-04-30 16:53:53 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`input` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`returnCode` int(10) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`stdout` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`stderr` 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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2012-04-30 16:53:53 +02:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_cache` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
USE `{$NAMESPACE}_cache`;
|
2013-01-17 01:42:41 +01:00
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `cache_general` (
|
2013-01-17 01:42:41 +01:00
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`cacheKeyHash` binary(12) NOT NULL,
|
|
|
|
`cacheKey` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheFormat` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`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};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `cache_markupcache` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`cacheKey` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cacheData` longblob 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 `cacheKey` (`cacheKey`),
|
|
|
|
KEY `dateCreated` (`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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_fact` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_fact`;
|
|
|
|
|
|
|
|
CREATE TABLE `fact_aggregate` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`factType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`valueX` bigint(20) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `factType` (`factType`,`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `fact_cursor` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`name` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`position` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `name` (`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
|
|
|
|
|
|
|
CREATE TABLE `fact_raw` (
|
|
|
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`factType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectA` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`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`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `factType_2` (`factType`,`objectA`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_ponder` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_ponder`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `ponder_answer` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`questionID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`voteCount` int(10) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`content` 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,
|
2015-09-29 22:27:33 +02:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_oneanswerperquestion` (`questionID`,`authorPHID`),
|
|
|
|
KEY `questionID` (`questionID`),
|
2015-09-29 22:27:33 +02:00
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `ponder_answertransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `ponder_answertransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `ponder_question` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`contentSource` longtext COLLATE {$COLLATE_TEXT},
|
2014-01-18 01:11:16 +01:00
|
|
|
`answerCount` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`answerWiki` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
KEY `authorPHID` (`authorPHID`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `status` (`status`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `ponder_questiontransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `ponder_questiontransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_xhprof` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_xhprof`;
|
|
|
|
|
|
|
|
CREATE TABLE `xhprof_sample` (
|
2014-11-07 21:29:24 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`sampleRate` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`usTotal` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`hostname` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`requestPath` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`controller` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`userPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `filePHID` (`filePHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_pholio` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_pholio`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `pholio_image` (
|
|
|
|
`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
|
|
|
`mockID` int(10) unsigned DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`filePHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`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',
|
2014-11-07 21:29:24 +01:00
|
|
|
`replacesImagePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `keyPHID` (`phid`),
|
|
|
|
KEY `mockID` (`mockID`,`isObsolete`,`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
|
|
|
|
|
|
|
CREATE TABLE `pholio_mock` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`originalName` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`coverPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) 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
|
|
|
`status` varchar(12) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`spacePHID` varbinary(64) DEFAULT 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`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `pholio_transaction` (
|
|
|
|
`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,
|
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
|
|
|
`metadata` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `pholio_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`imageID`,`transactionPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_conpherence` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_conpherence`;
|
|
|
|
|
2015-01-23 01:10:26 +01:00
|
|
|
CREATE TABLE `conpherence_index` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`threadPHID` varbinary(64) NOT NULL,
|
|
|
|
`transactionPHID` varbinary(64) NOT NULL,
|
|
|
|
`previousTransactionPHID` varbinary(64) DEFAULT NULL,
|
2015-01-27 15:30:36 +01:00
|
|
|
`corpus` longtext CHARACTER SET {$CHARSET_FULLTEXT} COLLATE {$COLLATE_FULLTEXT} NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
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};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `conpherence_participant` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`participantPHID` varbinary(64) NOT NULL,
|
|
|
|
`conpherencePHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`participationStatus` int(10) unsigned NOT NULL DEFAULT '0',
|
|
|
|
`dateTouched` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`behindTransactionPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`seenMessageCount` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`settings` 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 `conpherencePHID` (`conpherencePHID`,`participantPHID`),
|
|
|
|
KEY `unreadCount` (`participantPHID`,`participationStatus`),
|
|
|
|
KEY `participationIndex` (`participantPHID`,`dateTouched`,`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
|
|
|
|
|
|
|
CREATE TABLE `conpherence_thread` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`imagePHIDs` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`messageCount` bigint(20) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`recentParticipantPHIDs` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`joinPolicy` varbinary(64) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` varchar(20) 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 `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
|
|
|
|
|
|
|
CREATE TABLE `conpherence_transaction` (
|
|
|
|
`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,
|
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
|
|
|
`metadata` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `conpherence_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`conpherencePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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};
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_config` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_config`;
|
|
|
|
|
|
|
|
CREATE TABLE `config_entry` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`namespace` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`configKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`value` longtext 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_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
|
|
|
|
|
|
|
CREATE TABLE `config_transaction` (
|
|
|
|
`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,
|
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
|
|
|
`metadata` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_token` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_token`;
|
|
|
|
|
|
|
|
CREATE TABLE `token_count` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenCount` int(10) unsigned NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `token_given` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenPHID` 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`),
|
|
|
|
UNIQUE KEY `key_all` (`objectPHID`,`authorPHID`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_token` (`tokenPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_releeph` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_releeph`;
|
|
|
|
|
|
|
|
CREATE TABLE `releeph_branch` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`basename` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`releephProjectID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`createdByUserPHID` varbinary(64) NOT NULL,
|
|
|
|
`cutPointCommitPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isActive` tinyint(1) NOT NULL DEFAULT '1',
|
2014-11-07 21:29:24 +01:00
|
|
|
`symbolicName` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`details` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `releephProjectID_2` (`releephProjectID`,`basename`),
|
|
|
|
UNIQUE KEY `releephProjectID_name` (`releephProjectID`,`name`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2014-01-18 01:11:16 +01:00
|
|
|
UNIQUE KEY `releephProjectID` (`releephProjectID`,`symbolicName`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `releeph_branchtransaction` (
|
|
|
|
`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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `releeph_producttransaction` (
|
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,
|
|
|
|
`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,
|
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
|
|
|
|
|
|
|
CREATE TABLE `releeph_project` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`trunkBranch` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`repositoryPHID` varbinary(64) NOT NULL,
|
|
|
|
`createdByUserPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`isActive` tinyint(1) NOT NULL DEFAULT '1',
|
2014-11-07 21:29:24 +01:00
|
|
|
`details` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `projectName` (`name`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `releeph_request` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`branchID` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`requestUserPHID` varbinary(64) NOT NULL,
|
|
|
|
`requestCommitPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`commitIdentifier` varchar(40) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`commitPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`pickStatus` int(10) unsigned DEFAULT NULL,
|
|
|
|
`details` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`userIntents` longtext COLLATE {$COLLATE_TEXT},
|
2014-01-18 01:11:16 +01:00
|
|
|
`inBranch` tinyint(1) NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`requestedObjectPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `requestIdentifierBranch` (`requestCommitPHID`,`branchID`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `branchID` (`branchID`),
|
|
|
|
KEY `key_requestedObject` (`requestedObjectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `releeph_requesttransaction` (
|
|
|
|
`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,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` 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
|
|
|
|
|
|
|
CREATE TABLE `releeph_requesttransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phlux` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phlux`;
|
|
|
|
|
|
|
|
CREATE TABLE `phlux_transaction` (
|
|
|
|
`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,
|
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
|
|
|
`metadata` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `phlux_variable` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`variableKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`variableValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_key` (`variableKey`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01: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
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phortune`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `phortune_account` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) 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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `phortune_accounttransaction` (
|
|
|
|
`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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_cart` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`cartClass` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`subscriptionPHID` varbinary(64) DEFAULT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`isInvoice` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_account` (`accountPHID`),
|
2015-03-02 18:57:38 +01:00
|
|
|
KEY `key_merchant` (`merchantPHID`),
|
|
|
|
KEY `key_subscription` (`subscriptionPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_carttransaction` (
|
|
|
|
`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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_charge` (
|
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,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`cartPHID` varbinary(64) NOT NULL,
|
|
|
|
`paymentMethodPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`amountAsCurrency` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerPHID` varbinary(64) NOT NULL,
|
|
|
|
`amountRefundedAsCurrency` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`refundingPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`refundedChargePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_cart` (`cartPHID`),
|
|
|
|
KEY `key_account` (`accountPHID`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`),
|
|
|
|
KEY `key_provider` (`providerPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_merchant` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_merchanttransaction` (
|
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,
|
|
|
|
`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`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_object` (`objectPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_paymentmethod` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`accountPHID` varbinary(64) NOT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`brand` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`expires` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`lastFourDigits` varchar(16) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerPHID` varbinary(64) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_account` (`accountPHID`,`status`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`,`accountPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_paymentproviderconfig` (
|
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,
|
|
|
|
`merchantPHID` varbinary(64) NOT NULL,
|
|
|
|
`providerClassKey` binary(12) NOT NULL,
|
|
|
|
`providerClass` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`isEnabled` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_merchant` (`merchantPHID`,`providerClassKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_paymentproviderconfigtransaction` (
|
|
|
|
`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,
|
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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `phortune_product` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`metadata` longtext 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) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`productRefKey` binary(12) NOT NULL,
|
|
|
|
`productRef` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_product` (`productClassKey`,`productRefKey`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phortune_purchase` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`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) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`quantity` int(10) unsigned NOT NULL,
|
|
|
|
`status` varchar(32) 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_cart` (`cartPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2015-03-02 18:57:38 +01:00
|
|
|
CREATE TABLE `phortune_subscription` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`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) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`subscriptionRefKey` binary(12) NOT NULL,
|
|
|
|
`subscriptionRef` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`defaultPaymentMethodPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_subscription` (`subscriptionClassKey`,`subscriptionRefKey`),
|
|
|
|
KEY `key_account` (`accountPHID`),
|
|
|
|
KEY `key_merchant` (`merchantPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phrequent` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phrequent`;
|
|
|
|
|
|
|
|
CREATE TABLE `phrequent_usertime` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`note` longtext COLLATE {$COLLATE_TEXT},
|
2014-01-18 01:11:16 +01:00
|
|
|
`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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_diviner` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_diviner`;
|
|
|
|
|
|
|
|
CREATE TABLE `diviner_liveatom` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`symbolPHID` varbinary(64) NOT NULL,
|
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`atomData` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `symbolPHID` (`symbolPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `diviner_livebook` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`configurationData` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `name` (`name`),
|
|
|
|
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
|
|
|
|
2015-09-29 22:27:33 +02:00
|
|
|
CREATE TABLE `diviner_livebooktransaction` (
|
|
|
|
`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
|
|
|
CREATE TABLE `diviner_livesymbol` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`bookPHID` varbinary(64) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`repositoryPHID` varbinary(64) DEFAULT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`context` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`type` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`atomIndex` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`identityHash` binary(12) NOT NULL,
|
|
|
|
`graphHash` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`title` longtext COLLATE {$COLLATE_TEXT},
|
|
|
|
`titleSlugHash` binary(12) DEFAULT NULL,
|
|
|
|
`groupName` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`summary` longtext COLLATE {$COLLATE_TEXT},
|
2014-01-18 01:11:16 +01:00
|
|
|
`isDocumentable` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`nodeHash` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `identityHash` (`identityHash`),
|
|
|
|
UNIQUE KEY `phid` (`phid`),
|
|
|
|
UNIQUE KEY `graphHash` (`graphHash`),
|
|
|
|
UNIQUE KEY `nodeHash` (`nodeHash`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `key_slug` (`titleSlugHash`),
|
2014-01-18 01:11:16 +01:00
|
|
|
KEY `bookPHID` (`bookPHID`,`type`,`name`(64),`context`(64),`atomIndex`),
|
2014-11-07 21:29:24 +01:00
|
|
|
KEY `name` (`name`(64))
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_auth` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_auth`;
|
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `auth_factorconfig` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`userPHID` varbinary(64) NOT NULL,
|
|
|
|
`factorKey` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`factorName` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`factorSecret` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` 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_user` (`userPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
2014-01-18 01:11:16 +01:00
|
|
|
CREATE TABLE `auth_providerconfig` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`providerClass` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providerDomain` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`shouldTrustEmails` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`properties` 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,
|
2015-03-02 18:57:38 +01:00
|
|
|
`shouldAutoLogin` tinyint(1) NOT NULL DEFAULT '0',
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_provider` (`providerType`,`providerDomain`),
|
|
|
|
KEY `key_class` (`providerClass`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `auth_providerconfigtransaction` (
|
|
|
|
`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,
|
|
|
|
`metadata` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` 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};
|
|
|
|
|
|
|
|
CREATE TABLE `auth_sshkey` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2016-01-19 18:56:48 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyType` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyBody` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`keyComment` varchar(255) 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,
|
2015-01-23 01:10:26 +01:00
|
|
|
`keyIndex` binary(12) NOT NULL,
|
|
|
|
`isTrusted` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
2015-01-23 01:10:26 +01:00
|
|
|
UNIQUE KEY `key_unique` (`keyIndex`),
|
2016-01-19 18:56:48 +01:00
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-01-23 01:10:26 +01: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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE TABLE `auth_temporarytoken` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`tokenType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`tokenExpires` int(10) unsigned NOT NULL,
|
|
|
|
`tokenCode` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_token` (`objectPHID`,`tokenType`,`tokenCode`),
|
|
|
|
KEY `key_expires` (`tokenExpires`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_doorkeeper` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_doorkeeper`;
|
|
|
|
|
|
|
|
CREATE TABLE `doorkeeper_externalobject` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`objectKey` binary(12) NOT NULL,
|
|
|
|
`applicationType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`applicationDomain` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectType` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectID` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`objectURI` varchar(128) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`importerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`properties` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` 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`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
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};
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_legalpad` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_legalpad`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `legalpad_document` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`contributorCount` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`recentContributorPHIDs` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`versions` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`documentBodyPHID` varbinary(64) NOT NULL,
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`signatureType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`preamble` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
2015-03-02 18:57:38 +01:00
|
|
|
`requireSignature` tinyint(1) NOT NULL DEFAULT '0',
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-03-02 18:57:38 +01:00
|
|
|
KEY `key_creator` (`creatorPHID`,`dateModified`),
|
|
|
|
KEY `key_required` (`requireSignature`,`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
|
|
|
|
|
|
|
CREATE TABLE `legalpad_documentbody` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`documentPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`version` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`title` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`text` longtext COLLATE {$COLLATE_TEXT},
|
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`),
|
|
|
|
UNIQUE KEY `key_document` (`documentPHID`,`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
|
|
|
|
|
|
|
CREATE TABLE `legalpad_documentsignature` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`documentPHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`documentVersion` int(10) unsigned NOT NULL DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`signatureType` varchar(4) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`signerName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signerEmail` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`signatureData` 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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`secretKey` binary(20) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`verified` tinyint(1) DEFAULT '0',
|
2014-11-07 21:29:24 +01:00
|
|
|
`isExemption` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`exemptionPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_signer` (`signerPHID`,`dateModified`),
|
|
|
|
KEY `secretKey` (`secretKey`),
|
|
|
|
KEY `key_document` (`documentPHID`,`signerPHID`,`documentVersion`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `legalpad_transaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `legalpad_transaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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,
|
|
|
|
`documentID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`lineNumber` int(10) unsigned NOT NULL,
|
|
|
|
`lineLength` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`fixedState` varchar(12) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`hasReplies` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`replyToCommentPHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`),
|
|
|
|
UNIQUE KEY `key_draft` (`authorPHID`,`documentID`,`transactionPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_policy` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_policy`;
|
|
|
|
|
|
|
|
CREATE TABLE `policy` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`rules` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`defaultAction` varchar(32) 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 `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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_nuance` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_nuance`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `nuance_item` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`requestorPHID` varbinary(64) NOT NULL,
|
|
|
|
`sourcePHID` varbinary(64) NOT NULL,
|
|
|
|
`sourceLabel` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`status` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
`queuePHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_source` (`sourcePHID`,`status`),
|
|
|
|
KEY `key_owner` (`ownerPHID`,`status`),
|
|
|
|
KEY `key_requestor` (`requestorPHID`,`status`),
|
|
|
|
KEY `key_queue` (`queuePHID`,`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_itemtransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_itemtransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `nuance_queue` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `nuance_queuetransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_queuetransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `nuance_requestor` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`data` 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`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `nuance_requestorsource` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`requestorPHID` varbinary(64) NOT NULL,
|
|
|
|
`sourcePHID` varbinary(64) NOT NULL,
|
|
|
|
`sourceKey` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` 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_source_key` (`sourcePHID`,`sourceKey`),
|
|
|
|
KEY `key_requestor` (`requestorPHID`,`id`),
|
|
|
|
KEY `key_source` (`sourcePHID`,`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_requestortransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_requestortransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `nuance_source` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`type` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`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,
|
2015-09-29 22:27:33 +02:00
|
|
|
`defaultQueuePHID` varbinary(64) NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_type` (`type`,`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_sourcetransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `nuance_sourcetransaction_comment` (
|
|
|
|
`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,
|
2014-11-07 21:29:24 +01:00
|
|
|
`content` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_passphrase` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_passphrase`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credential` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`credentialType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`providesType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`username` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`secretID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`isDestroyed` tinyint(1) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`isLocked` tinyint(1) NOT NULL,
|
|
|
|
`allowConduit` tinyint(1) NOT NULL DEFAULT '0',
|
2015-09-29 22:27:33 +02:00
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_secret` (`secretID`),
|
|
|
|
KEY `key_type` (`credentialType`),
|
2015-09-29 22:27:33 +02:00
|
|
|
KEY `key_provides` (`providesType`),
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `passphrase_credentialtransaction` (
|
|
|
|
`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
|
|
|
|
|
|
|
CREATE TABLE `passphrase_secret` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`secretData` longblob 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
|
|
|
|
2014-11-07 21:29:24 +01:00
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phragment` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phragment`;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`data` longtext 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
|
|
|
|
|
|
|
CREATE TABLE `phragment_fragment` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`path` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-01-18 01:11:16 +01:00
|
|
|
`depth` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`latestVersionPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_path` (`path`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `phragment_fragmentversion` (
|
|
|
|
`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
|
|
|
`sequence` int(10) unsigned NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
`fragmentPHID` varbinary(64) NOT NULL,
|
|
|
|
`filePHID` 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`),
|
2014-11-07 21:29:24 +01:00
|
|
|
UNIQUE KEY `key_version` (`fragmentPHID`,`sequence`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2014-01-18 01:11:16 +01:00
|
|
|
|
|
|
|
CREATE TABLE `phragment_snapshot` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`primaryFragmentPHID` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) 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`),
|
|
|
|
UNIQUE KEY `key_name` (`primaryFragmentPHID`,`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
|
|
|
|
|
|
|
CREATE TABLE `phragment_snapshotchild` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-11-07 21:29:24 +01:00
|
|
|
`snapshotPHID` varbinary(64) NOT NULL,
|
|
|
|
`fragmentPHID` varbinary(64) NOT NULL,
|
|
|
|
`fragmentVersionPHID` 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`),
|
|
|
|
UNIQUE KEY `key_child` (`snapshotPHID`,`fragmentPHID`,`fragmentVersionPHID`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_dashboard` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_dashboard`;
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`layoutConfig` longtext 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,
|
2015-09-29 22:27:33 +02:00
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_install` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`installerPHID` varbinary(64) NOT NULL,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`applicationClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dashboardPHID` varbinary(64) NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`applicationClass`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_panel` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`panelType` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isArchived` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`properties` 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`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_paneltransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `dashboard_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) 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};
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_system` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_system`;
|
|
|
|
|
|
|
|
CREATE TABLE `system_actionlog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`actorHash` binary(12) NOT NULL,
|
|
|
|
`actorIdentity` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`action` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`score` double NOT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_epoch` (`epoch`),
|
|
|
|
KEY `key_action` (`actorHash`,`action`,`epoch`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `system_destructionlog` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectClass` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`rootLogID` int(10) unsigned DEFAULT NULL,
|
|
|
|
`objectPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`objectMonogram` varchar(64) COLLATE {$COLLATE_TEXT} DEFAULT NULL,
|
|
|
|
`epoch` int(10) unsigned NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `key_epoch` (`epoch`)
|
|
|
|
) 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`;
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
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) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`amountAsCurrency` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`properties` 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_initiative` (`initiativePHID`),
|
|
|
|
KEY `key_backer` (`backerPHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
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) 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};
|
|
|
|
|
|
|
|
CREATE TABLE `fund_initiative` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`ownerPHID` varbinary(64) NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`merchantPHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`risks` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`totalAsCurrency` varchar(64) 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};
|
|
|
|
|
|
|
|
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) 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};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_almanac` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_almanac`;
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_binding` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`servicePHID` varbinary(64) NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`interfacePHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) 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_service` (`servicePHID`,`interfacePHID`),
|
|
|
|
KEY `key_device` (`devicePHID`),
|
|
|
|
KEY `key_interface` (`interfacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_bindingtransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_device` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`nameIndex` binary(12) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
2015-01-23 01:10:26 +01:00
|
|
|
`isLocked` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_name` (`nameIndex`),
|
|
|
|
KEY `key_nametext` (`name`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_devicetransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_interface` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`devicePHID` varbinary(64) NOT NULL,
|
|
|
|
`networkPHID` varbinary(64) NOT NULL,
|
|
|
|
`address` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`port` 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_location` (`networkPHID`,`address`,`port`),
|
|
|
|
KEY `key_device` (`devicePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_network` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) 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,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_networktransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_property` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`objectPHID` varbinary(64) NOT NULL,
|
|
|
|
`fieldIndex` binary(12) NOT NULL,
|
|
|
|
`fieldName` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`fieldValue` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `objectPHID` (`objectPHID`,`fieldIndex`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_service` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(128) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`nameIndex` binary(12) 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,
|
2015-01-23 01:10:26 +01:00
|
|
|
`serviceClass` varchar(64) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isLocked` tinyint(1) NOT NULL,
|
2014-11-07 21:29:24 +01:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_name` (`nameIndex`),
|
2015-01-23 01:10:26 +01:00
|
|
|
KEY `key_nametext` (`name`),
|
|
|
|
KEY `key_class` (`serviceClass`)
|
2014-11-07 21:29:24 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `almanac_servicetransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
2015-09-29 22:27:33 +02:00
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_multimeter` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_multimeter`;
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_context` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext 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 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};
|
|
|
|
|
|
|
|
CREATE TABLE `multimeter_host` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext 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 TABLE `multimeter_label` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext 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 TABLE `multimeter_viewer` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` longtext 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}_spaces` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_spaces`;
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `spaces_namespace` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`namespaceName` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`isDefaultNamespace` tinyint(1) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`isArchived` tinyint(1) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_default` (`isDefaultNamespace`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `spaces_namespacetransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$NAMESPACE}_phurl` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_phurl`;
|
|
|
|
|
|
|
|
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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_url` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`longURL` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`viewPolicy` varbinary(64) NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`spacePHID` varbinary(64) DEFAULT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`alias` varchar(64) CHARACTER SET {$CHARSET_SORT} COLLATE {$COLLATE_SORT} DEFAULT NULL,
|
|
|
|
`authorPHID` varbinary(64) NOT NULL,
|
2016-01-19 18:56:48 +01:00
|
|
|
`mailKey` binary(20) NOT NULL,
|
2015-09-29 22:27:33 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
UNIQUE KEY `key_instance` (`alias`),
|
|
|
|
KEY `key_author` (`authorPHID`),
|
|
|
|
KEY `key_space` (`spacePHID`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_urltransaction` (
|
|
|
|
`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};
|
|
|
|
|
|
|
|
CREATE TABLE `phurl_urltransaction_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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}_badges` /*!40100 DEFAULT CHARACTER SET {$CHARSET} COLLATE {$COLLATE_TEXT} */;
|
|
|
|
|
|
|
|
USE `{$NAMESPACE}_badges`;
|
|
|
|
|
|
|
|
CREATE TABLE `badges_badge` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varbinary(64) NOT NULL,
|
|
|
|
`name` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`flavor` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`description` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`icon` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`quality` varchar(255) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`status` varchar(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`editPolicy` varbinary(64) NOT NULL,
|
|
|
|
`creatorPHID` varbinary(64) NOT NULL,
|
|
|
|
`mailKey` binary(20) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `key_phid` (`phid`),
|
|
|
|
KEY `key_creator` (`creatorPHID`,`dateModified`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|
|
|
|
|
|
|
|
CREATE TABLE `badges_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) 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};
|
|
|
|
|
|
|
|
CREATE TABLE `badges_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 COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
`contentSource` longtext 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 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};
|
|
|
|
|
|
|
|
CREATE TABLE `edgedata` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`data` longtext COLLATE {$COLLATE_TEXT} NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET={$CHARSET} COLLATE={$COLLATE_TEXT};
|