1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

SQL Patch Management: SQL Changes

Summary:
Splits out the SQL changes. These are most of the changes, but primarily mechanical:

  - Moved "initialize.sql" to "0000.legacy.sql" and partially reverted to an older version, such that patches 0000 + 000 + 001 + ... + 137 put us in the right state when applied sequentially.
  - Removed "create database" commands from all SQL. These are handled by separate DB patches now, so we have the data to do operations like "storage databases" (list databases) and "storage destroy" (drop databases).
  - Removed "phabricator_" namespace from all SQL, and replaced with "{$NAMESPACE}_" token so we can namespace databases.
  - Shortened some column lengths so patches apply correctly if originally created as InnoDB; also a few similar tweaks elsewhere.

Test Plan: See D2323 for discussion and test plan.

Reviewers: edward, vrana, btrahan, jungejason

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T140, T345

Differential Revision: https://secure.phabricator.com/D2329
This commit is contained in:
epriestley 2012-04-30 07:53:53 -07:00
parent 321b776148
commit 68b597ff75
129 changed files with 2770 additions and 2570 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
create database phabricator_project;
create table phabricator_project.project (
create table {$NAMESPACE}_project.project (
id int unsigned not null auto_increment primary key,
name varchar(255) not null,
unique key (name),
@ -8,7 +8,7 @@ create table phabricator_project.project (
dateCreated int unsigned not null,
dateModified int unsigned not null
);
create table phabricator_project.project_profile (
create table {$NAMESPACE}_project.project_profile (
id int unsigned not null auto_increment primary key,
projectPHID varchar(64) binary not null,
unique key (projectPHID),
@ -17,7 +17,7 @@ create table phabricator_project.project_profile (
dateCreated int unsigned not null,
dateModified int unsigned not null
);
create table phabricator_project.project_affiliation (
create table {$NAMESPACE}_project.project_affiliation (
id int unsigned not null auto_increment primary key,
projectPHID varchar(64) binary not null,
userPHID varchar(64) binary not null,

View file

@ -0,0 +1,762 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
USE `{$NAMESPACE}_conduit`;
DROP TABLE IF EXISTS `conduit_connectionlog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `conduit_connectionlog` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`client` varchar(255) DEFAULT NULL,
`clientVersion` varchar(255) DEFAULT NULL,
`clientDescription` varchar(255) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `conduit_methodcalllog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `conduit_methodcalllog` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`connectionID` bigint(20) unsigned DEFAULT NULL,
`method` varchar(255) NOT NULL,
`error` varchar(255) NOT NULL,
`duration` bigint(20) unsigned NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_differential`;
DROP TABLE IF EXISTS `differential_changeset`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_changeset` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`diffID` int(10) unsigned NOT NULL,
`oldFile` varchar(255) DEFAULT NULL,
`fileName` varchar(255) NOT NULL,
`awayPaths` longblob,
`changeType` int(10) unsigned NOT NULL,
`fileType` int(10) unsigned NOT NULL,
`metadata` longblob,
`oldProperties` longblob,
`newProperties` longblob,
`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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_changeset_parse_cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_changeset_parse_cache` (
`id` int(10) unsigned NOT NULL,
`cache` longblob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_comment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_comment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`revisionID` int(10) unsigned NOT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`action` varchar(64) NOT NULL,
`content` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`cache` longblob,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_diff`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_diff` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`revisionID` int(10) unsigned DEFAULT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`sourceMachine` varchar(255) DEFAULT NULL,
`sourcePath` varchar(255) DEFAULT NULL,
`sourceControlSystem` varchar(64) DEFAULT NULL,
`sourceControlBaseRevision` varchar(255) DEFAULT NULL,
`sourceControlpath` varchar(255) DEFAULT NULL,
`lintStatus` int(10) unsigned NOT NULL,
`unitStatus` int(10) unsigned NOT NULL,
`lineCount` int(10) unsigned NOT NULL,
`branch` varchar(255) DEFAULT NULL,
`parentRevisionID` int(10) unsigned DEFAULT NULL,
`arcanistProject` varchar(255) DEFAULT NULL,
`creationMethod` varchar(255) DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_diffproperty`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_diffproperty` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`diffID` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`data` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_hunk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_hunk` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`changesetID` int(10) unsigned NOT NULL,
`changes` longblob,
`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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_inlinecomment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_inlinecomment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`revisionID` int(10) unsigned NOT NULL,
`commentID` int(10) unsigned DEFAULT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`changesetID` int(10) unsigned NOT NULL,
`isNewFile` tinyint(1) NOT NULL,
`lineNumber` int(10) unsigned NOT NULL,
`lineLength` int(10) unsigned NOT NULL,
`content` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`cache` longblob,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_relationship`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_relationship` (
`revisionID` int(10) unsigned NOT NULL,
`relation` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`objectPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`sequence` int(10) unsigned NOT NULL,
`reasonPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`revisionID`,`relation`,`objectPHID`),
KEY `objectPHID` (`objectPHID`,`relation`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `differential_revision`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `differential_revision` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`status` varchar(32) NOT NULL,
`summary` longtext NOT NULL,
`testPlan` text NOT NULL,
`revertPlan` text NOT NULL,
`blameRevision` varchar(255) NOT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`dateCommitted` int(10) unsigned DEFAULT NULL,
`lineCount` int(10) unsigned DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`attached` longtext NOT NULL,
`unsubscribed` longblob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_draft`;
DROP TABLE IF EXISTS `draft`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `draft` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`draftKey` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`draft` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `authorPHID` (`authorPHID`,`draftKey`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_file`;
DROP TABLE IF EXISTS `file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) DEFAULT NULL,
`mimeType` varchar(255) DEFAULT NULL,
`byteSize` bigint(20) unsigned NOT NULL,
`storageEngine` varchar(32) NOT NULL,
`storageFormat` varchar(32) NOT NULL,
`storageHandle` varchar(255) NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `file_storageblob`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file_storageblob` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_metamta`;
DROP TABLE IF EXISTS `metamta_mail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `metamta_mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parameters` longblob NOT NULL,
`status` varchar(255) NOT NULL,
`message` text,
`retryCount` int(10) unsigned NOT NULL,
`nextRetry` int(10) unsigned NOT NULL,
`relatedPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `metamta_mailinglist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `metamta_mailinglist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`uri` varchar(255) DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_phid`;
DROP TABLE IF EXISTS `phid`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phid` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`phidType` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`parentPHID` varchar(64) DEFAULT NULL,
`ownerPHID` varchar(64) DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `phid` (`phid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `phid_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phid_type` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(4) NOT NULL,
`name` varchar(255) NOT NULL,
`description` text,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_user`;
DROP TABLE IF EXISTS `phabricator_session`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phabricator_session` (
`userPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`type` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`sessionKey` varchar(40) NOT NULL,
`sessionStart` int(10) unsigned NOT NULL,
PRIMARY KEY (`userPHID`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`userName` varchar(64) NOT NULL,
`realName` varchar(128) NOT NULL,
`email` varchar(255) NOT NULL,
`passwordSalt` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`passwordHash` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`facebookUID` bigint(20) unsigned DEFAULT NULL,
`profileImagePHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`consoleEnabled` tinyint(1) NOT NULL,
`consoleVisible` tinyint(1) NOT NULL,
`consoleTab` varchar(64) NOT NULL,
`conduitCertificate` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `userName` (`userName`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `facebookUID` (`facebookUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user_profile`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_profile` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`title` varchar(255) NOT NULL,
`blurb` text NOT NULL,
`profileImagePHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `userPHID` (`userPHID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_file`;
DROP TABLE IF EXISTS `file`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) DEFAULT NULL,
`mimeType` varchar(255) DEFAULT NULL,
`byteSize` bigint(20) unsigned NOT NULL,
`storageEngine` varchar(32) NOT NULL,
`storageFormat` varchar(32) NOT NULL,
`storageHandle` varchar(255) NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `file_storageblob`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `file_storageblob` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_repository`;
DROP TABLE IF EXISTS `repository`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `repository` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`name` varchar(255) NOT NULL,
`callsign` varchar(32) NOT NULL,
`description` text,
`versionControlSystem` varchar(32) NOT NULL,
`details` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `callsign` (`callsign`),
UNIQUE KEY `phid` (`phid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `repository_githubnotification`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `repository_githubnotification` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`repositoryPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`remoteAddress` varchar(32) NOT NULL,
`payload` longblob NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `repositoryPHID` (`repositoryPHID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_search`;
DROP TABLE IF EXISTS `search_document`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_document` (
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`documentType` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`documentTitle` varchar(255) NOT NULL,
`documentCreated` int(10) unsigned NOT NULL,
`documentModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`phid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `search_documentfield`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_documentfield` (
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`phidType` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`field` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`auxPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`corpus` text,
KEY `phid` (`phid`),
FULLTEXT KEY `corpus` (`corpus`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `search_documentrelationship`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_documentrelationship` (
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`relatedPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`relation` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`relatedType` varchar(4) NOT NULL,
`relatedTime` int(10) unsigned NOT NULL,
KEY `phid` (`phid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `search_query`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_query` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`query` varchar(255) NOT NULL,
`parameters` text NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
USE `{$NAMESPACE}_maniphest`;
DROP TABLE IF EXISTS `maniphest_task`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maniphest_task` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`ownerPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`ccPHIDs` text,
`attached` longtext NOT NULL,
`status` int(10) unsigned NOT NULL,
`priority` int(10) unsigned NOT NULL,
`title` text NOT NULL,
`description` longtext NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `maniphest_touch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maniphest_touch` (
`userPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`taskID` int(10) unsigned NOT NULL,
`touchedAt` int(10) unsigned NOT NULL,
PRIMARY KEY (`userPHID`,`taskID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `maniphest_transaction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maniphest_transaction` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`taskID` int(10) unsigned NOT NULL,
`authorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`transactionType` varchar(16) NOT NULL,
`oldValue` longblob,
`newValue` longblob,
`comments` longblob,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
`cache` longblob,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

View file

@ -1,2 +1,2 @@
alter table phabricator_maniphest.maniphest_task add projectPHIDs longblob not null;
update phabricator_maniphest.maniphest_task set projectPHIDs = '[]';
alter table {$NAMESPACE}_maniphest.maniphest_task add projectPHIDs longblob not null;
update {$NAMESPACE}_maniphest.maniphest_task set projectPHIDs = '[]';

View file

@ -1,4 +1,4 @@
create table phabricator_user.user_oauthinfo (
create table {$NAMESPACE}_user.user_oauthinfo (
id int unsigned not null auto_increment primary key,
userID int unsigned not null,
oauthProvider varchar(255) not null,
@ -9,10 +9,10 @@ create table phabricator_user.user_oauthinfo (
dateModified int unsigned not null
);
insert into phabricator_user.user_oauthinfo
insert into {$NAMESPACE}_user.user_oauthinfo
(userID, oauthProvider, oauthUID, dateCreated, dateModified)
SELECT id, 'facebook', facebookUID, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
FROM phabricator_user.user
FROM {$NAMESPACE}_user.user
WHERE facebookUID is not null;
alter table phabricator_user.user drop facebookUID;
alter table {$NAMESPACE}_user.user drop facebookUID;

View file

@ -1,6 +1,6 @@
alter table phabricator_user.user_oauthinfo add accountURI varchar(255);
alter table phabricator_user.user_oauthinfo add accountName varchar(255);
alter table phabricator_user.user_oauthinfo add token varchar(255);
alter table phabricator_user.user_oauthinfo add tokenExpires int unsigned;
alter table phabricator_user.user_oauthinfo add tokenScope varchar(255);
alter table phabricator_user.user_oauthinfo add tokenStatus varchar(255);
alter table {$NAMESPACE}_user.user_oauthinfo add accountURI varchar(255);
alter table {$NAMESPACE}_user.user_oauthinfo add accountName varchar(255);
alter table {$NAMESPACE}_user.user_oauthinfo add token varchar(255);
alter table {$NAMESPACE}_user.user_oauthinfo add tokenExpires int unsigned;
alter table {$NAMESPACE}_user.user_oauthinfo add tokenScope varchar(255);
alter table {$NAMESPACE}_user.user_oauthinfo add tokenStatus varchar(255);

View file

@ -1,4 +1,4 @@
create table phabricator_repository.repository_commit (
create table {$NAMESPACE}_repository.repository_commit (
id int unsigned not null auto_increment primary key,
repositoryPHID varchar(64) binary not null,
phid varchar(64) binary not null,
@ -8,21 +8,21 @@ create table phabricator_repository.repository_commit (
unique key (repositoryPHID, commitIdentifier)
);
create database phabricator_timeline;
create table phabricator_timeline.timeline_event (
create table {$NAMESPACE}_timeline.timeline_event (
id int unsigned not null auto_increment primary key,
type char(4) binary not null,
key (type, id)
);
create table phabricator_timeline.timeline_eventdata (
create table {$NAMESPACE}_timeline.timeline_eventdata (
id int unsigned not null auto_increment primary key,
eventID int unsigned not null,
eventData longblob not null,
unique key (eventID)
);
create table phabricator_timeline.timeline_cursor (
create table {$NAMESPACE}_timeline.timeline_cursor (
name varchar(255) not null primary key,
position int unsigned not null
);

View file

@ -1,6 +1,6 @@
create database phabricator_worker;
create table phabricator_worker.worker_task (
create table {$NAMESPACE}_worker.worker_task (
id int unsigned not null auto_increment primary key,
taskClass varchar(255) not null,
leaseOwner varchar(255),
@ -12,7 +12,7 @@ create table phabricator_worker.worker_task (
key(leaseExpires)
);
create table phabricator_worker.worker_taskdata (
create table {$NAMESPACE}_worker.worker_taskdata (
id int unsigned not null auto_increment primary key,
taskID int unsigned not null,
data longblob not null,

View file

@ -1,4 +1,4 @@
create table phabricator_repository.repository_commitdata (
create table {$NAMESPACE}_repository.repository_commitdata (
id int unsigned not null auto_increment primary key,
commitID int unsigned not null,
authorName varchar(255) not null,
@ -7,17 +7,17 @@ create table phabricator_repository.repository_commitdata (
key (authorName)
);
ALTER TABLE phabricator_worker.worker_task drop priority;
ALTER TABLE phabricator_worker.worker_task drop key leaseOwner;
ALTER TABLE phabricator_worker.worker_task add key (leaseOwner(16));
ALTER TABLE {$NAMESPACE}_worker.worker_task drop priority;
ALTER TABLE {$NAMESPACE}_worker.worker_task drop key leaseOwner;
ALTER TABLE {$NAMESPACE}_worker.worker_task add key (leaseOwner(16));
create table phabricator_repository.repository_path (
create table {$NAMESPACE}_repository.repository_path (
id int unsigned not null auto_increment primary key,
path varchar(512) binary not null,
path varchar(128) binary not null,
unique key (path)
);
create table phabricator_repository.repository_pathchange (
create table {$NAMESPACE}_repository.repository_pathchange (
repositoryID int unsigned NOT NULL,
pathID int unsigned NOT NULL,
commitID int unsigned NOT NULL,
@ -31,7 +31,7 @@ create table phabricator_repository.repository_pathchange (
key (repositoryID, pathID, commitSequence)
);
create table phabricator_repository.repository_filesystem (
create table {$NAMESPACE}_repository.repository_filesystem (
repositoryID int unsigned not null,
parentID int unsigned not null,
svnCommit int unsigned not null,
@ -41,16 +41,16 @@ create table phabricator_repository.repository_filesystem (
primary key (repositoryID, parentID, svnCommit, pathID)
);
alter table phabricator_repository.repository_filesystem add key (repositoryID, svnCommit);
alter table {$NAMESPACE}_repository.repository_filesystem add key (repositoryID, svnCommit);
truncate phabricator_repository.repository_commit;
alter table phabricator_repository.repository_commit
truncate {$NAMESPACE}_repository.repository_commit;
alter table {$NAMESPACE}_repository.repository_commit
change repositoryPHID repositoryID int unsigned not null;
alter table phabricator_repository.repository_commit drop key repositoryPHID;
alter table phabricator_repository.repository_commit add unique key
alter table {$NAMESPACE}_repository.repository_commit drop key repositoryPHID;
alter table {$NAMESPACE}_repository.repository_commit add unique key
(repositoryID, commitIdentifier(16));
alter table phabricator_repository.repository_commit add key
alter table {$NAMESPACE}_repository.repository_commit add key
(repositoryID, epoch);
alter table phabricator_repository.repository_filesystem
alter table {$NAMESPACE}_repository.repository_filesystem
add key (repositoryID, pathID, svnCommit);

View file

@ -1,6 +1,6 @@
create database phabricator_daemon;
create table phabricator_daemon.daemon_log (
create table {$NAMESPACE}_daemon.daemon_log (
id int unsigned not null auto_increment primary key,
daemon varchar(255) not null,
host varchar(255) not null,
@ -10,7 +10,7 @@ create table phabricator_daemon.daemon_log (
dateModified int unsigned not null
);
create table phabricator_daemon.daemon_logevent (
create table {$NAMESPACE}_daemon.daemon_logevent (
id int unsigned not null auto_increment primary key,
logID int unsigned not null,
logType varchar(4) not null,

View file

@ -1,5 +1,5 @@
ALTER TABLE phabricator_repository.repository_filesystem DROP PRIMARY KEY;
ALTER TABLE phabricator_repository.repository_filesystem
ALTER TABLE {$NAMESPACE}_repository.repository_filesystem DROP PRIMARY KEY;
ALTER TABLE {$NAMESPACE}_repository.repository_filesystem
DROP KEY repositoryID_2;
ALTER TABLE phabricator_repository.repository_filesystem
ALTER TABLE {$NAMESPACE}_repository.repository_filesystem
ADD PRIMARY KEY (repositoryID, parentID, pathID, svnCommit);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_repository.`repository_summary` (
CREATE TABLE {$NAMESPACE}_repository.`repository_summary` (
`repositoryID` int(10) unsigned NOT NULL,
`size` int(10) unsigned NOT NULL,
`lastCommitID` int(10) unsigned NOT NULL,

View file

@ -1,13 +1,13 @@
CREATE DATABASE IF NOT EXISTS phabricator_herald;
CREATE TABLE phabricator_herald.herald_action (
CREATE TABLE {$NAMESPACE}_herald.herald_action (
id int unsigned not null auto_increment primary key,
ruleID int unsigned not null,
action varchar(255) not null,
target text not null
);
CREATE TABLE phabricator_herald.herald_rule (
CREATE TABLE {$NAMESPACE}_herald.herald_rule (
id int unsigned not null auto_increment primary key,
name varchar(255) not null,
authorPHID varchar(64) binary not null,
@ -19,7 +19,7 @@ CREATE TABLE phabricator_herald.herald_rule (
unique key (authorPHID, name)
);
CREATE TABLE phabricator_herald.herald_condition (
CREATE TABLE {$NAMESPACE}_herald.herald_condition (
id int unsigned not null auto_increment primary key,
ruleID int unsigned not null,
fieldName varchar(255) not null,
@ -27,7 +27,7 @@ CREATE TABLE phabricator_herald.herald_condition (
value text not null
);
CREATE TABLE phabricator_herald.herald_transcript (
CREATE TABLE {$NAMESPACE}_herald.herald_transcript (
id int unsigned not null auto_increment primary key,
phid varchar(64) binary not null,
time int unsigned not null,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_repository.repository_badcommit (
CREATE TABLE {$NAMESPACE}_repository.repository_badcommit (
fullCommitName varchar(255) binary not null primary key,
description longblob not null
);

View file

@ -1 +1 @@
DROP TABLE phabricator_phid.phid_type;
DROP TABLE {$NAMESPACE}_phid.phid_type;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_repository.repository_commitdata
ALTER TABLE {$NAMESPACE}_repository.repository_commitdata
ADD commitDetails LONGBLOB NOT NULL;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_repository.repository_shortcut (
CREATE TABLE {$NAMESPACE}_repository.repository_shortcut (
id int unsigned not null auto_increment primary key,
name varchar(255) not null,
href varchar(255) not null,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_user.user_preferences (
CREATE TABLE {$NAMESPACE}_user.user_preferences (
id int unsigned not null auto_increment primary key,
userPHID varchar(64) binary not null,
preferences longblob not null,

View file

@ -1 +1 @@
ALTER TABLE phabricator_user.user ADD key (realName);
ALTER TABLE {$NAMESPACE}_user.user ADD key (realName);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_user.user ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_user.phabricator_session ADD UNIQUE KEY (sessionKey);
ALTER TABLE {$NAMESPACE}_user.user ADD UNIQUE KEY (phid);
ALTER TABLE {$NAMESPACE}_user.phabricator_session ADD UNIQUE KEY (sessionKey);

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_owners;
CREATE TABLE phabricator_owners.owners_package (
CREATE TABLE {$NAMESPACE}_owners.owners_package (
id int unsigned not null auto_increment primary key,
phid varchar(64) binary not null,
unique key(phid),
@ -10,7 +10,7 @@ CREATE TABLE phabricator_owners.owners_package (
primaryOwnerPHID varchar(64) binary
);
CREATE TABLE phabricator_owners.owners_owner (
CREATE TABLE {$NAMESPACE}_owners.owners_owner (
id int unsigned not null auto_increment primary key,
packageID int unsigned not null,
userPHID varchar(64) binary not null,
@ -18,7 +18,7 @@ CREATE TABLE phabricator_owners.owners_owner (
KEY(userPHID)
);
CREATE TABLE phabricator_owners.owners_path (
CREATE TABLE {$NAMESPACE}_owners.owners_path (
id int unsigned not null auto_increment primary key,
packageID int unsigned not null,
key(packageID),

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_repository.repository_arcanistproject (
CREATE TABLE {$NAMESPACE}_repository.repository_arcanistproject (
id int unsigned not null auto_increment primary key,
phid varchar(64) binary not null,
unique key(phid),
@ -7,11 +7,11 @@ CREATE TABLE phabricator_repository.repository_arcanistproject (
repositoryID int unsigned
);
ALTER TABLE phabricator_repository.repository
ALTER TABLE {$NAMESPACE}_repository.repository
ADD uuid varchar(64) binary;
ALTER TABLE phabricator_differential.differential_diff
ALTER TABLE {$NAMESPACE}_differential.differential_diff
CHANGE arcanistProject arcanistProjectPHID varchar(64) binary;
ALTER TABLE phabricator_differential.differential_diff
ALTER TABLE {$NAMESPACE}_differential.differential_diff
ADD repositoryUUID varchar(64) binary;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_differential.differential_diff
ALTER TABLE {$NAMESPACE}_differential.differential_diff
CHANGE sourceControlpath sourceControlPath varchar(255);

View file

@ -1,5 +1,5 @@
CREATE DATABASE IF NOT EXISTS phabricator_xhpastview;
CREATE TABLE phabricator_xhpastview.xhpastview_parsetree (
CREATE TABLE {$NAMESPACE}_xhpastview.xhpastview_parsetree (
id int unsigned not null auto_increment primary key,
authorPHID varchar(64) binary,
input longblob not null,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_differential.differential_commit (
CREATE TABLE {$NAMESPACE}_differential.differential_commit (
revisionID int unsigned not null,
commitPHID varchar(64) binary not null,
primary key (revisionID, commitPHID),

View file

@ -1,29 +1,29 @@
ALTER TABLE phabricator_differential.differential_changeset
ALTER TABLE {$NAMESPACE}_differential.differential_changeset
ADD KEY (diffID);
ALTER TABLE phabricator_differential.differential_comment
ALTER TABLE {$NAMESPACE}_differential.differential_comment
ADD KEY (revisionID);
ALTER TABLE phabricator_differential.differential_diff
ALTER TABLE {$NAMESPACE}_differential.differential_diff
ADD KEY (revisionID);
ALTER TABLE phabricator_differential.differential_inlinecomment
ALTER TABLE {$NAMESPACE}_differential.differential_inlinecomment
ADD KEY (changesetID);
ALTER TABLE phabricator_differential.differential_inlinecomment
ALTER TABLE {$NAMESPACE}_differential.differential_inlinecomment
ADD KEY (commentID);
ALTER TABLE phabricator_differential.differential_hunk
ALTER TABLE {$NAMESPACE}_differential.differential_hunk
ADD KEY (changesetID);
ALTER TABLE phabricator_herald.herald_transcript
ALTER TABLE {$NAMESPACE}_herald.herald_transcript
ADD KEY (objectPHID);
ALTER TABLE phabricator_differential.differential_revision
ALTER TABLE {$NAMESPACE}_differential.differential_revision
ADD KEY (authorPHID, status);
ALTER TABLE phabricator_differential.differential_revision
ALTER TABLE {$NAMESPACE}_differential.differential_revision
ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_metamta.metamta_mailinglist
ALTER TABLE {$NAMESPACE}_metamta.metamta_mailinglist
ADD UNIQUE KEY (phid);

View file

@ -1,6 +1,6 @@
ALTER TABLE phabricator_metamta.metamta_mailinglist
ALTER TABLE {$NAMESPACE}_metamta.metamta_mailinglist
ADD UNIQUE KEY (email);
ALTER TABLE phabricator_metamta.metamta_mailinglist
ALTER TABLE {$NAMESPACE}_metamta.metamta_mailinglist
ADD UNIQUE KEY (name);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_differential.differential_inlinecomment
ALTER TABLE {$NAMESPACE}_differential.differential_inlinecomment
ADD KEY (revisionID, authorPHID);

View file

@ -1,3 +1,3 @@
ALTER TABLE phabricator_differential.differential_diffproperty
ALTER TABLE {$NAMESPACE}_differential.differential_diffproperty
ADD UNIQUE KEY (diffID, name);

View file

@ -1,5 +1,5 @@
ALTER TABLE phabricator_metamta.metamta_mail
ALTER TABLE {$NAMESPACE}_metamta.metamta_mail
ADD KEY (status, nextRetry);
ALTER TABLE phabricator_metamta.metamta_mail
ALTER TABLE {$NAMESPACE}_metamta.metamta_mail
ADD KEY (relatedPHID);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_user.user
ALTER TABLE {$NAMESPACE}_user.user
ADD isSystemAgent bool not null default 0;

View file

@ -1,13 +1,13 @@
ALTER TABLE phabricator_timeline.timeline_event
ALTER TABLE {$NAMESPACE}_timeline.timeline_event
ADD dataID int unsigned;
ALTER TABLE phabricator_timeline.timeline_event
ALTER TABLE {$NAMESPACE}_timeline.timeline_event
ADD UNIQUE KEY (dataID);
UPDATE phabricator_timeline.timeline_event e,
phabricator_timeline.timeline_eventdata d
UPDATE {$NAMESPACE}_timeline.timeline_event e,
{$NAMESPACE}_timeline.timeline_eventdata d
SET e.dataID = d.id
WHERE d.eventID = e.id;
ALTER TABLE phabricator_timeline.timeline_eventdata
ALTER TABLE {$NAMESPACE}_timeline.timeline_eventdata
DROP eventID;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_file.`file_imagemacro` (
CREATE TABLE {$NAMESPACE}_file.`file_imagemacro` (
`id` int unsigned NOT NULL auto_increment PRIMARY KEY,
`filePHID` varchar(64) NOT NULL,
`name` varchar(255) NOT NULL

View file

@ -1,13 +1,13 @@
ALTER TABLE phabricator_worker.worker_task
ALTER TABLE {$NAMESPACE}_worker.worker_task
ADD dataID int unsigned;
ALTER TABLE phabricator_worker.worker_task
ALTER TABLE {$NAMESPACE}_worker.worker_task
ADD UNIQUE KEY (dataID);
UPDATE phabricator_worker.worker_task t,
phabricator_worker.worker_taskdata d
UPDATE {$NAMESPACE}_worker.worker_task t,
{$NAMESPACE}_worker.worker_taskdata d
SET t.dataID = d.id
WHERE d.taskID = t.id;
ALTER TABLE phabricator_worker.worker_taskdata
ALTER TABLE {$NAMESPACE}_worker.worker_taskdata
DROP taskID;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_differential.differential_viewtime (
CREATE TABLE {$NAMESPACE}_differential.differential_viewtime (
viewerPHID varchar(64) not null,
objectPHID varchar(64) not null,
viewTime int unsigned not null,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_herald.herald_savedheader (
CREATE TABLE {$NAMESPACE}_herald.herald_savedheader (
phid varchar(64) binary not null primary key,
header varchar(255) not null
) ENGINE=InnoDB;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_file.file_proxyimage (
CREATE TABLE {$NAMESPACE}_file.file_proxyimage (
id int unsigned not null primary key auto_increment,
uri varchar(255) binary not null,
unique key(uri),

View file

@ -1,10 +1,10 @@
ALTER TABLE phabricator_differential.differential_revision
ALTER TABLE {$NAMESPACE}_differential.differential_revision
ADD mailKey VARCHAR(40) binary NOT NULL;
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD mailKey VARCHAR(40) binary NOT NULL;
CREATE TABLE phabricator_metamta.metamta_receivedmail (
CREATE TABLE {$NAMESPACE}_metamta.metamta_receivedmail (
id int unsigned not null primary key auto_increment,
headers longblob not null,
bodies longblob not null,

View file

@ -1,5 +1,5 @@
ALTER TABLE phabricator_user.user
ALTER TABLE {$NAMESPACE}_user.user
ADD isDisabled bool NOT NULL;
ALTER TABLE phabricator_user.user
ALTER TABLE {$NAMESPACE}_user.user
ADD isAdmin bool NOT NULL;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_user.user_log (
CREATE TABLE {$NAMESPACE}_user.user_log (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
actorPHID varchar(64) BINARY,
key(actorPHID, dateCreated),
@ -14,14 +14,14 @@ CREATE TABLE phabricator_user.user_log (
key(dateCreated)
);
ALTER TABLE phabricator_user.user_log
ALTER TABLE {$NAMESPACE}_user.user_log
ADD remoteAddr varchar(16) NOT NULL;
ALTER TABLE phabricator_user.user_log
ALTER TABLE {$NAMESPACE}_user.user_log
ADD KEY (remoteAddr, dateCreated);
ALTER TABLE phabricator_user.user_log
ALTER TABLE {$NAMESPACE}_user.user_log
ADD session varchar(40);
ALTER TABLE phabricator_user.user_log
ALTER TABLE {$NAMESPACE}_user.user_log
ADD KEY (session, dateCreated);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_file.file_transformedfile (
CREATE TABLE {$NAMESPACE}_file.file_transformedfile (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
originalPHID varchar(64) BINARY NOT NULL,
transform varchar(255) BINARY NOT NULL,

View file

@ -1,7 +1,7 @@
CREATE TABLE phabricator_herald.herald_ruleapplied (
CREATE TABLE {$NAMESPACE}_herald.herald_ruleapplied (
ruleID int unsigned not null,
phid varchar(64) binary not null,
PRIMARY KEY(ruleID, phid)
) ENGINE=InnoDB;
ALTER TABLE phabricator_herald.herald_rule add repetitionPolicy int unsigned;
ALTER TABLE {$NAMESPACE}_herald.herald_rule add repetitionPolicy int unsigned;

View file

@ -1,11 +1,11 @@
ALTER TABLE phabricator_differential.differential_comment
ALTER TABLE {$NAMESPACE}_differential.differential_comment
ADD metadata LONGBLOB NOT NULL;
UPDATE phabricator_differential.differential_comment
UPDATE {$NAMESPACE}_differential.differential_comment
SET metadata = '{}' WHERE metadata = '';
ALTER TABLE phabricator_maniphest.maniphest_transaction
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_transaction
ADD metadata LONGBLOB NOT NULL;
UPDATE phabricator_maniphest.maniphest_transaction
UPDATE {$NAMESPACE}_maniphest.maniphest_transaction
SET metadata = '{}' WHERE metadata = '';

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_pastebin;
CREATE TABLE phabricator_pastebin.pastebin_paste (
CREATE TABLE {$NAMESPACE}_pastebin.pastebin_paste (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
phid VARCHAR(64) BINARY NOT NULL,
@ -9,9 +9,3 @@ CREATE TABLE phabricator_pastebin.pastebin_paste (
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL
);
INSERT INTO phabricator_directory.directory_item
(name, description, href, categoryID, sequence, dateCreated, dateModified)
VALUES
("Paste", "Mmm... tasty, delicious paste.", "/paste/", 5, 150,
UNIX_TIMESTAMP(), UNIX_TIMESTAMP());

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_countdown;
CREATE TABLE phabricator_countdown.countdown_timer (
CREATE TABLE {$NAMESPACE}_countdown.countdown_timer (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
authorPHID VARCHAR(64) BINARY NOT NULL,
@ -8,9 +8,3 @@ CREATE TABLE phabricator_countdown.countdown_timer (
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL
);
INSERT INTO phabricator_directory.directory_item
(name, description, href, categoryID, sequence, dateCreated, dateModified)
VALUES
("Countdown", "Utilize the full capabilities of your ALU.", "/countdown/", 5, 350,
UNIX_TIMESTAMP(), UNIX_TIMESTAMP());

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_user.user
ALTER TABLE {$NAMESPACE}_user.user
ADD timezoneIdentifier varchar(255) NOT NULL;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_conduit.conduit_certificatetoken (
CREATE TABLE {$NAMESPACE}_conduit.conduit_certificatetoken (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
userPHID VARCHAR(64) BINARY NOT NULL,
token VARCHAR(64),
@ -6,7 +6,7 @@ CREATE TABLE phabricator_conduit.conduit_certificatetoken (
dateModified INT UNSIGNED NOT NULL
);
ALTER TABLE phabricator_conduit.conduit_certificatetoken
ALTER TABLE {$NAMESPACE}_conduit.conduit_certificatetoken
ADD UNIQUE KEY (userPHID);
ALTER TABLE phabricator_conduit.conduit_certificatetoken
ALTER TABLE {$NAMESPACE}_conduit.conduit_certificatetoken
ADD UNIQUE KEY (token);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_project.project
ALTER TABLE {$NAMESPACE}_project.project
ADD status varchar(32) not null;

View file

@ -1,5 +1,5 @@
ALTER TABLE phabricator_search.search_documentrelationship
ALTER TABLE {$NAMESPACE}_search.search_documentrelationship
add key (relatedPHID, relation);
ALTER TABLE phabricator_search.search_documentrelationship
ALTER TABLE {$NAMESPACE}_search.search_documentrelationship
add key (relation, relatedPHID);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_project.project_affiliation
ALTER TABLE {$NAMESPACE}_project.project_affiliation
ADD isOwner bool NOT NULL;

View file

@ -1,20 +1,20 @@
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD ownerOrdering varchar(64);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD KEY (priority, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD KEY (status);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD KEY (ownerPHID, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD KEY (authorPHID, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD KEY (ownerOrdering);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_maniphest.maniphest_taskproject (
CREATE TABLE {$NAMESPACE}_maniphest.maniphest_taskproject (
taskPHID varchar(64) BINARY NOT NULL,
projectPHID varchar(64) BINARY NOT NULL,
PRIMARY KEY (projectPHID, taskPHID),

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_pastebin.pastebin_paste
ALTER TABLE {$NAMESPACE}_pastebin.pastebin_paste
ADD COLUMN language VARCHAR(64) NOT NULL;

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_feed;
CREATE TABLE phabricator_feed.feed_storydata (
CREATE TABLE {$NAMESPACE}_feed.feed_storydata (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) BINARY NOT NULL,
UNIQUE KEY (phid),
@ -13,7 +13,7 @@ CREATE TABLE phabricator_feed.feed_storydata (
dateModified INT UNSIGNED NOT NULL
);
CREATE TABLE phabricator_feed.feed_storyreference (
CREATE TABLE {$NAMESPACE}_feed.feed_storyreference (
objectPHID varchar(64) BINARY NOT NULL,
chronologicalKey BIGINT UNSIGNED NOT NULL,
UNIQUE KEY (objectPHID, chronologicalKey),

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_maniphest.maniphest_tasksubscriber (
CREATE TABLE {$NAMESPACE}_maniphest.maniphest_tasksubscriber (
taskPHID varchar(64) BINARY NOT NULL,
subscriberPHID varchar(64) BINARY NOT NULL,
PRIMARY KEY (subscriberPHID, taskPHID),

View file

@ -1,3 +1,3 @@
ALTER TABLE phabricator_file.file
ALTER TABLE {$NAMESPACE}_file.file
ADD COLUMN authorPHID VARCHAR(64) BINARY,
ADD KEY (authorPHID);

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_slowvote;
CREATE TABLE phabricator_slowvote.slowvote_poll (
CREATE TABLE {$NAMESPACE}_slowvote.slowvote_poll (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
question VARCHAR(255) NOT NULL,
phid VARCHAR(64) BINARY NOT NULL,
@ -13,7 +13,7 @@ CREATE TABLE phabricator_slowvote.slowvote_poll (
dateModified INT UNSIGNED NOT NULL
);
CREATE TABLE phabricator_slowvote.slowvote_option (
CREATE TABLE {$NAMESPACE}_slowvote.slowvote_option (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
pollID INT UNSIGNED NOT NULL,
KEY (pollID),
@ -22,7 +22,7 @@ CREATE TABLE phabricator_slowvote.slowvote_option (
dateModified INT UNSIGNED NOT NULL
);
CREATE TABLE phabricator_slowvote.slowvote_comment (
CREATE TABLE {$NAMESPACE}_slowvote.slowvote_comment (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
pollID INT UNSIGNED NOT NULL,
UNIQUE KEY (pollID, authorPHID),
@ -32,7 +32,7 @@ CREATE TABLE phabricator_slowvote.slowvote_comment (
dateModified INT UNSIGNED NOT NULL
);
CREATE TABLE phabricator_slowvote.slowvote_choice (
CREATE TABLE {$NAMESPACE}_slowvote.slowvote_choice (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
pollID INT UNSIGNED NOT NULL,
KEY (pollID),
@ -41,10 +41,4 @@ CREATE TABLE phabricator_slowvote.slowvote_choice (
KEY (authorPHID),
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL
);
INSERT INTO phabricator_directory.directory_item
(name, description, href, categoryID, sequence, dateCreated, dateModified)
VALUES
("Slowvote", "Design by committee.", "/vote/", 5, 250,
UNIX_TIMESTAMP(), UNIX_TIMESTAMP());
);

View file

@ -1,7 +1,7 @@
TRUNCATE phabricator_differential.differential_changeset_parse_cache;
TRUNCATE {$NAMESPACE}_differential.differential_changeset_parse_cache;
ALTER TABLE phabricator_differential.differential_changeset_parse_cache
ALTER TABLE {$NAMESPACE}_differential.differential_changeset_parse_cache
ADD dateCreated INT UNSIGNED NOT NULL;
ALTER TABLE phabricator_differential.differential_changeset_parse_cache
ALTER TABLE {$NAMESPACE}_differential.differential_changeset_parse_cache
ADD KEY (dateCreated);

View file

@ -1,11 +1,11 @@
ALTER TABLE phabricator_file.file
ALTER TABLE {$NAMESPACE}_file.file
ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_project.project
ALTER TABLE {$NAMESPACE}_project.project
ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_herald.herald_condition
ALTER TABLE {$NAMESPACE}_herald.herald_condition
ADD KEY (ruleID);
ALTER TABLE phabricator_herald.herald_action
ALTER TABLE {$NAMESPACE}_herald.herald_action
ADD KEY (ruleID);

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -25,7 +25,7 @@ $tables = queryfx_all(
WHERE s.TABLE_SCHEMA LIKE %>
AND s.TABLE_NAME != 'search_documentfield'
AND s.ENGINE != 'InnoDB'",
'phabricator_');
'{$NAMESPACE}_');
if (!$tables) {
return;

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_phriction;
CREATE TABLE phabricator_phriction.phriction_document (
CREATE TABLE {$NAMESPACE}_phriction.phriction_document (
id INT UNSIGNED NOT NULL,
phid VARCHAR(64) BINARY NOT NULL,
UNIQUE KEY (phid),

View file

@ -1,12 +1,12 @@
/* Patch 060 neglected to make this an AUTO_INCREMENT PRIMARY KEY */
ALTER TABLE phabricator_phriction.phriction_document
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;
/* Needs to be initially nullable for insert when documents are created. */
ALTER TABLE phabricator_phriction.phriction_document
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
CHANGE contentID contentID INT UNSIGNED;
CREATE TABLE phabricator_phriction.phriction_content (
CREATE TABLE {$NAMESPACE}_phriction.phriction_content (
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
documentID INT UNSIGNED NOT NULL,
version INT UNSIGNED NOT NULL,

View file

@ -1,9 +1,3 @@
/* Older versions incorrectly computed the depth for the root page. */
UPDATE phabricator_phriction.phriction_document
SET depth = 0 where slug = '/';
INSERT INTO phabricator_directory.directory_item
(name, description, href, categoryID, sequence, dateCreated, dateModified)
VALUES
("Phriction", "Write things down.", "/w/", 4, 1100,
UNIX_TIMESTAMP(), UNIX_TIMESTAMP());
UPDATE {$NAMESPACE}_phriction.phriction_document
SET depth = 0 where slug = '/';

View file

@ -1,3 +1,3 @@
ALTER TABLE phabricator_pastebin.pastebin_paste
ALTER TABLE {$NAMESPACE}_pastebin.pastebin_paste
ADD COLUMN parentPHID VARCHAR(64) BINARY,
ADD KEY (parentPHID);

View file

@ -1,9 +1,9 @@
ALTER TABLE phabricator_project.project
ALTER TABLE {$NAMESPACE}_project.project
ADD subprojectPHIDs longblob NOT NULL;
UPDATE phabricator_project.project
UPDATE {$NAMESPACE}_project.project
SET subprojectPHIDs = '[]';
CREATE TABLE phabricator_project.project_subproject (
CREATE TABLE {$NAMESPACE}_project.project_subproject (
projectPHID varchar(64) BINARY NOT NULL,
subprojectPHID varchar(64) BINARY NOT NULL,
PRIMARY KEY (subprojectPHID, projectPHID),

View file

@ -1,11 +1,11 @@
CREATE TABLE phabricator_user.user_sshkey (
CREATE TABLE {$NAMESPACE}_user.user_sshkey (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
userPHID varchar(64) BINARY NOT NULL,
key (userPHID),
name varchar(255),
keyType varchar(255),
keyBody varchar(32768) BINARY,
unique key (keyBody(512)),
unique key (keyBody(128)),
keyComment varchar(255),
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL

View file

@ -1,2 +1,2 @@
alter table phabricator_phriction.phriction_content
alter table {$NAMESPACE}_phriction.phriction_content
add description varchar(512);

View file

@ -1,2 +1 @@
DELETE FROM phabricator_directory.directory_item
WHERE href = '/preferences/';
/* This used to be a "directory" update. */;

View file

@ -1,4 +1,4 @@
create table phabricator_maniphest.maniphest_taskauxiliarystorage
create table {$NAMESPACE}_maniphest.maniphest_taskauxiliarystorage
(id int unsigned not null auto_increment primary key,
taskPHID varchar(64) binary not null,
name varchar(255) not null,

View file

@ -1,9 +1,9 @@
ALTER TABLE phabricator_herald.herald_transcript
ALTER TABLE {$NAMESPACE}_herald.herald_transcript
ADD garbageCollected BOOL NOT NULL DEFAULT 0;
UPDATE phabricator_herald.herald_transcript
UPDATE {$NAMESPACE}_herald.herald_transcript
SET garbageCollected = 1
WHERE objectTranscript = "";
ALTER TABLE phabricator_herald.herald_transcript
ALTER TABLE {$NAMESPACE}_herald.herald_transcript
ADD KEY (garbageCollected, time);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_differential.differential_auxiliaryfield (
CREATE TABLE {$NAMESPACE}_differential.differential_auxiliaryfield (
id INT UNSIGNED NOT NULL auto_increment PRIMARY KEY,
revisionPHID varchar(64) BINARY NOT NULL,
name VARCHAR(32) BINARY NOT NULL,

View file

@ -1,5 +1,5 @@
ALTER TABLE phabricator_differential.differential_comment
ALTER TABLE {$NAMESPACE}_differential.differential_comment
ADD contentSource VARCHAR(255);
ALTER TABLE phabricator_maniphest.maniphest_transaction
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_transaction
ADD contentSource VARCHAR(255);

View file

@ -1,20 +1,20 @@
INSERT INTO phabricator_differential.differential_auxiliaryfield
INSERT INTO {$NAMESPACE}_differential.differential_auxiliaryfield
(revisionPHID, name, value, dateCreated, dateModified)
SELECT phid, 'phabricator:blame-revision', blameRevision,
dateCreated, dateModified
FROM phabricator_differential.differential_revision
FROM {$NAMESPACE}_differential.differential_revision
WHERE blameRevision != '';
ALTER TABLE phabricator_differential.differential_revision
ALTER TABLE {$NAMESPACE}_differential.differential_revision
DROP blameRevision;
INSERT INTO phabricator_differential.differential_auxiliaryfield
INSERT INTO {$NAMESPACE}_differential.differential_auxiliaryfield
(revisionPHID, name, value, dateCreated, dateModified)
SELECT phid, 'phabricator:revert-plan', revertPlan,
dateCreated, dateModified
FROM phabricator_differential.differential_revision
FROM {$NAMESPACE}_differential.differential_revision
WHERE revertPlan != '';
ALTER TABLE phabricator_differential.differential_revision
ALTER TABLE {$NAMESPACE}_differential.differential_revision
DROP revertPlan;

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_repository.repository_symbol (
CREATE TABLE {$NAMESPACE}_repository.repository_symbol (
arcanistProjectID INT UNSIGNED NOT NULL,
symbolName varchar(128) NOT NULL,
KEY (symbolName),

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_differential.differential_affectedpath (
CREATE TABLE {$NAMESPACE}_differential.differential_affectedpath (
repositoryID INT UNSIGNED NOT NULL,
pathID INT UNSIGNED NOT NULL,
epoch INT UNSIGNED NOT NULL,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_differential.differential_revisionhash (
CREATE TABLE {$NAMESPACE}_differential.differential_revisionhash (
revisionID INT UNSIGNED NOT NULL,
type CHAR(4) BINARY NOT NULL,
hash VARCHAR(40) BINARY NOT NULL,

View file

@ -1,4 +1,4 @@
ALTER TABLE phabricator_repository.repository_arcanistproject
ALTER TABLE {$NAMESPACE}_repository.repository_arcanistproject
ADD symbolIndexLanguages LONGBLOB NOT NULL;
ALTER TABLE phabricator_repository.repository_arcanistproject
ALTER TABLE {$NAMESPACE}_repository.repository_arcanistproject
ADD symbolIndexProjects LONGBLOB NOT NULL;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_maniphest.maniphest_task
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
ADD originalEmailSource VARCHAR(255);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_user.user_nametoken (
CREATE TABLE {$NAMESPACE}_user.user_nametoken (
token VARCHAR(255) NOT NULL,
userID INT UNSIGNED NOT NULL,
KEY (token),

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_file.file
ALTER TABLE {$NAMESPACE}_file.file
ADD secretKey VARCHAR(20) BINARY;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_maniphest.maniphest_transaction
ALTER TABLE {$NAMESPACE}_maniphest.maniphest_transaction
ADD KEY (taskID);

View file

@ -1 +1 @@
DROP TABLE phabricator_differential.differential_viewtime;
DROP TABLE {$NAMESPACE}_differential.differential_viewtime;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_pastebin.pastebin_paste
ALTER TABLE {$NAMESPACE}_pastebin.pastebin_paste
ADD KEY (authorPHID);

View file

@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS phabricator_owners.owners_packagecommitrelationship (
CREATE TABLE IF NOT EXISTS {$NAMESPACE}_owners.owners_packagecommitrelationship (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`packagePHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`commitPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,

View file

@ -1 +1 @@
ALTER TABLE phabricator_project.project_affiliation DROP status;
ALTER TABLE {$NAMESPACE}_project.project_affiliation DROP status;

View file

@ -1,8 +1,8 @@
ALTER TABLE phabricator_phriction.phriction_document
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
ADD status INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE phabricator_phriction.phriction_content
ALTER TABLE {$NAMESPACE}_phriction.phriction_content
ADD changeType INT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE phabricator_phriction.phriction_content
ALTER TABLE {$NAMESPACE}_phriction.phriction_content
ADD changeRef INT UNSIGNED DEFAULT NULL;

View file

@ -1,12 +1,12 @@
CREATE DATABASE IF NOT EXISTS phabricator_audit;
ALTER TABLE phabricator_owners.owners_packagecommitrelationship
ALTER TABLE {$NAMESPACE}_owners.owners_packagecommitrelationship
ADD COLUMN `auditStatus` varchar(64) NOT NULL,
ADD COLUMN `auditReasons` longtext NOT NULL,
DROP KEY `packagePHID`,
ADD KEY `packagePHID` (`packagePHID`, `auditStatus`, `id`);
CREATE TABLE IF NOT EXISTs phabricator_audit.audit_comment (
CREATE TABLE IF NOT EXISTs {$NAMESPACE}_audit.audit_comment (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`targetPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
@ -19,5 +19,5 @@ CREATE TABLE IF NOT EXISTs phabricator_audit.audit_comment (
KEY `targetPHID` (`targetPHID`, `actorPHID`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE phabricator_owners.owners_package
ALTER TABLE {$NAMESPACE}_owners.owners_package
ADD COLUMN `auditingEnabled` tinyint(1) NOT NULL DEFAULT 0;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_project.project
ADD phrictionSlug varchar(512);
ALTER TABLE {$NAMESPACE}_project.project
ADD phrictionSlug varchar(128);

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_project.project
ALTER TABLE {$NAMESPACE}_project.project
ADD UNIQUE KEY (phrictionSlug);

View file

@ -1 +1 @@
DROP TABLE phabricator_repository.repository_githubnotification;
DROP TABLE {$NAMESPACE}_repository.repository_githubnotification;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_phriction.phriction_document
ALTER TABLE {$NAMESPACE}_phriction.phriction_document
CHANGE slug slug VARCHAR(128) NOT NULL;

View file

@ -1,6 +1 @@
UPDATE phabricator_directory.directory_item
SET name = 'MetaMTA (Admin Only)'
WHERE href = '/mail/';
DELETE FROM phabricator_directory.directory_item
WHERE href = '/xhprof/';
/* This used to be a "directory" update. */;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_differential.differential_changeset
ALTER TABLE {$NAMESPACE}_differential.differential_changeset
CHANGE fileName filename varchar(255) NOT NULL;

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_herald.herald_rule ADD ruleType varchar(255) not null DEFAULT 'global';
CREATE INDEX IDX_RULE_TYPE on phabricator_herald.herald_rule (ruleType);
ALTER TABLE {$NAMESPACE}_herald.herald_rule ADD ruleType varchar(255) not null DEFAULT 'global';
CREATE INDEX IDX_RULE_TYPE on {$NAMESPACE}_herald.herald_rule (ruleType);

View file

@ -1,6 +1,6 @@
CREATE DATABASE IF NOT EXISTS phabricator_drydock;
CREATE TABLE phabricator_drydock.drydock_resource (
CREATE TABLE {$NAMESPACE}_drydock.drydock_resource (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) BINARY NOT NULL,
name VARCHAR(255) NOT NULL,
@ -15,7 +15,7 @@ CREATE TABLE phabricator_drydock.drydock_resource (
UNIQUE KEY (phid)
) ENGINE=InnoDB;
CREATE TABLE phabricator_drydock.drydock_lease (
CREATE TABLE {$NAMESPACE}_drydock.drydock_lease (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) BINARY NOT NULL,
resourceID INT UNSIGNED,

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_project.project_transaction (
CREATE TABLE {$NAMESPACE}_project.project_transaction (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
projectID INT UNSIGNED NOT NULL,
authorPHID VARCHAR(64) BINARY NOT NULL,

View file

@ -1,2 +1,2 @@
ALTER TABLE phabricator_herald.herald_ruleapplied
ALTER TABLE {$NAMESPACE}_herald.herald_ruleapplied
ADD KEY (phid);

View file

@ -1,4 +1,4 @@
CREATE TABLE phabricator_herald.herald_ruleedit (
CREATE TABLE {$NAMESPACE}_herald.herald_ruleedit (
id int unsigned not null auto_increment primary key,
ruleID int unsigned not null,
editorPHID varchar(64) BINARY not null,

View file

@ -1,15 +1,15 @@
ALTER TABLE phabricator_search.search_query
ALTER TABLE {$NAMESPACE}_search.search_query
DROP authorPHID;
ALTER TABLE phabricator_search.search_query
ALTER TABLE {$NAMESPACE}_search.search_query
ADD queryKey VARCHAR(12) NOT NULL;
/* Preserve URIs for old queries in case anyone has them bookmarked. */
UPDATE phabricator_search.search_query
UPDATE {$NAMESPACE}_search.search_query
SET queryKey = id;
ALTER TABLE phabricator_search.search_query
ALTER TABLE {$NAMESPACE}_search.search_query
ADD UNIQUE KEY (queryKey);
/* NOTE: Accidentally added this as 104, merging. */
UPDATE phabricator_project.project SET status = IF(status = 5, 100, 0);
UPDATE {$NAMESPACE}_project.project SET status = IF(status = 5, 100, 0);

View file

@ -1,4 +1,4 @@
/* Prior to D1615, we used the raw output of `file` to determine mime types,
without stripping carriage returns. This creates Content-Type headers
which are blocked by response-splitting protections introduced in D1564. */
UPDATE phabricator_file.file SET mimeType = TRIM(BOTH "\n" FROM mimeType);
UPDATE {$NAMESPACE}_file.file SET mimeType = TRIM(BOTH "\n" FROM mimeType);

Some files were not shown because too many files have changed in this diff Show more