-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `conduit_methodcalllog`
---
-
-LOCK TABLES `conduit_methodcalllog` WRITE;
-/*!40000 ALTER TABLE `conduit_methodcalllog` DISABLE KEYS */;
-INSERT INTO `conduit_methodcalllog` VALUES (1,NULL,'daemon.log','',4569,1304349508,1304349508),(2,NULL,'daemon.log','',2335,1304349508,1304349508),(3,NULL,'daemon.log','',2463,1304349508,1304349508),(4,NULL,'daemon.log','',4507,1304349546,1304349546),(5,NULL,'daemon.log','',3366,1304349546,1304349546);
-/*!40000 ALTER TABLE `conduit_methodcalllog` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Current Database: `phabricator_daemon`
---
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phabricator_daemon` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `phabricator_daemon`;
-
---
--- Table structure for table `daemon_log`
---
-
-DROP TABLE IF EXISTS `daemon_log`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `daemon_log` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `daemon` varchar(255) NOT NULL,
- `host` varchar(255) NOT NULL,
- `pid` int(10) unsigned NOT NULL,
- `argv` varchar(512) 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 */;
-
---
--- Dumping data for table `daemon_log`
---
-
-LOCK TABLES `daemon_log` WRITE;
-/*!40000 ALTER TABLE `daemon_log` DISABLE KEYS */;
-/*!40000 ALTER TABLE `daemon_log` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `daemon_logevent`
---
-
-DROP TABLE IF EXISTS `daemon_logevent`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `daemon_logevent`
---
-
-LOCK TABLES `daemon_logevent` WRITE;
-/*!40000 ALTER TABLE `daemon_logevent` DISABLE KEYS */;
-INSERT INTO `daemon_logevent` VALUES (1,7,'INIT','',1304349508),(2,9,'INIT','',1304349508),(3,10,'INIT','',1304349508),(4,6,'INIT','',1304349546),(5,8,'INIT','',1304349546);
-/*!40000 ALTER TABLE `daemon_logevent` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Current Database: `phabricator_differential`
---
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phabricator_differential` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `phabricator_differential`;
-
---
--- Table structure for table `differential_changeset`
---
-
-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`),
- KEY `diffID` (`diffID`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `differential_changeset`
---
-
-LOCK TABLES `differential_changeset` WRITE;
-/*!40000 ALTER TABLE `differential_changeset` DISABLE KEYS */;
-/*!40000 ALTER TABLE `differential_changeset` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `differential_changeset_parse_cache`
---
-
-DROP TABLE IF EXISTS `differential_changeset_parse_cache`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `directory_category`
---
-
-LOCK TABLES `directory_category` WRITE;
-/*!40000 ALTER TABLE `directory_category` DISABLE KEYS */;
-INSERT INTO `directory_category` VALUES (2,'Documentation',9000,1295318729,1304349639),(4,'Workflow',0,1295321164,1304349630),(5,'Utilities',100,1295321217,1295321217),(6,'Internals',2000,1295888559,1295888569);
-/*!40000 ALTER TABLE `directory_category` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `directory_item`
---
-
-DROP TABLE IF EXISTS `directory_item`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `directory_item` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL,
- `description` text NOT NULL,
- `href` varchar(255) NOT NULL,
- `categoryID` int(10) unsigned NOT NULL,
- `sequence` int(10) unsigned NOT NULL,
- `imagePHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `directory_item`
---
-
-LOCK TABLES `directory_item` WRITE;
-/*!40000 ALTER TABLE `directory_item` DISABLE KEYS */;
-INSERT INTO `directory_item` VALUES (1,'Repositories','Configure tracked source code repositories.','/repository/',6,500,NULL,1304349659,1304349947),(5,'libphutil Docs','Soothing prose; seductive poetry.','http://phabricator.com/docs/libphutil/',2,300,'',1295312416,1304349695),(12,'Files','Blob store for Pokemon pictures.','/file/',5,100,'',1295321244,1304349844),(13,'Differential','Make code.','/differential/',4,100,'',1295321263,1304350150),(14,'PHID Manager','Manage PHIDs.','/phid/',6,400,'',1295762315,1304349943),(15,'People','User directory. Sort of a social utility.','/people/',5,400,'',1295830520,1304349833),(16,'Conduit Console','Web console for Conduit API.','/conduit/',6,100,'',1295888593,1304349910),(17,'MetaMTA','Yo dawg, we heard you like MTAs.','/mail/',6,300,'',1296006261,1304349936),(18,'XHProf','PHP profiling tool.','/xhprof/',6,600,NULL,1296684238,1304349951),(20,'Maniphest','Do meta-work instead of work.','/maniphest/',4,300,NULL,1297190663,1304349876),(21,'Arcanist Docs','Words have never been so finely crafted.','http://phabricator.com/docs/arcanist/',2,200,NULL,1304349712,1304349712),(22,'Phabricator Ducks','Oops, that should say \"Docs\".','http://phabricator.com/docs/phabricator/',2,100,NULL,1304349728,1304349728),(23,'Javelin Docs','O, what noble scribe hath penned these words?','http://phabricator.com/docs/javelin/',2,400,NULL,1304349746,1304349746),(24,'UI Examples','A gallery of modern art.','/uiexample/',2,500,NULL,1304349763,1304349769),(25,'Diffusion','Look at code.','/diffusion/',4,200,NULL,1304349788,1304349873),(26,'Herald','Watch for danger.','/herald/',4,400,NULL,1304349817,1304349817),(30,'Preferences','You are a snowflake princess.','/preferences/',5,600,NULL,1304350225,1304350307),(27,'Owners','Adopt today!','/owners/',5,500,NULL,1304349896,1304349896),(28,'Daemon Console','Offline process management.','/daemon/',6,200,NULL,1304349927,1304349927),(29,'XHPAST','XHP AST generator.','/xhpast/',6,700,NULL,1304350140,1304350140),(31,'Project','Group stuff into big piles.','/project/',5,500,NULL,1304350290,1304350299);
-/*!40000 ALTER TABLE `directory_item` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Current Database: `phabricator_draft`
---
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phabricator_draft` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `phabricator_draft`;
-
---
--- Table structure for table `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,
+ `userPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `taskID` int(10) unsigned NOT NULL,
+ `touchedAt` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`userPHID`,`taskID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `maniphest_transaction` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `taskID` int(10) unsigned NOT NULL,
+ `authorPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `transactionType` varchar(16) NOT NULL,
+ `oldValue` longtext CHARACTER SET utf8 COLLATE utf8_bin,
+ `newValue` longtext CHARACTER SET utf8 COLLATE utf8_bin,
+ `comments` longtext CHARACTER SET utf8 COLLATE utf8_bin,
+ `dateCreated` int(10) unsigned NOT NULL,
+ `dateModified` int(10) unsigned NOT NULL,
+ `cache` longtext CHARACTER SET utf8 COLLATE utf8_bin,
+ `metadata` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `contentSource` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `taskID` (`taskID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE DATABASE IF NOT EXISTS `{$NAMESPACE}_meta_data` DEFAULT CHARACTER SET utf8;
+
+USE `{$NAMESPACE}_meta_data`;
+
+CREATE TABLE `patch_status` (
+ `patch` varchar(255) NOT NULL,
+ `applied` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`patch`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `patch_status` VALUES ('phabricator:000.project.sql',1),('phabricator:0000.legacy.sql',1),('phabricator:001.maniphest_projects.sql',1),('phabricator:002.oauth.sql',1),('phabricator:003.more_oauth.sql',1),('phabricator:004.daemonrepos.sql',1),('phabricator:005.workers.sql',1),('phabricator:006.repository.sql',1),('phabricator:007.daemonlog.sql',1),('phabricator:008.repoopt.sql',1),('phabricator:009.repo_summary.sql',1),('phabricator:010.herald.sql',1),('phabricator:011.badcommit.sql',1),('phabricator:012.dropphidtype.sql',1),('phabricator:013.commitdetail.sql',1),('phabricator:014.shortcuts.sql',1),('phabricator:015.preferences.sql',1),('phabricator:016.userrealnameindex.sql',1),('phabricator:017.sessionkeys.sql',1),('phabricator:018.owners.sql',1),('phabricator:019.arcprojects.sql',1),('phabricator:020.pathcapital.sql',1),('phabricator:021.xhpastview.sql',1),('phabricator:022.differentialcommit.sql',1),('phabricator:023.dxkeys.sql',1),('phabricator:024.mlistkeys.sql',1),('phabricator:025.commentopt.sql',1),('phabricator:026.diffpropkey.sql',1),('phabricator:027.metamtakeys.sql',1),('phabricator:028.systemagent.sql',1),('phabricator:029.cursors.sql',1),('phabricator:030.imagemacro.sql',1),('phabricator:031.workerrace.sql',1),('phabricator:032.viewtime.sql',1),('phabricator:033.privtest.sql',1),('phabricator:034.savedheader.sql',1),('phabricator:035.proxyimage.sql',1),('phabricator:036.mailkey.sql',1),('phabricator:037.setuptest.sql',1),('phabricator:038.admin.sql',1),('phabricator:039.userlog.sql',1),('phabricator:040.transform.sql',1),('phabricator:041.heraldrepetition.sql',1),('phabricator:042.commentmetadata.sql',1),('phabricator:043.pastebin.sql',1),('phabricator:044.countdown.sql',1),('phabricator:045.timezone.sql',1),('phabricator:046.conduittoken.sql',1),('phabricator:047.projectstatus.sql',1),('phabricator:048.relationshipkeys.sql',1),('phabricator:049.projectowner.sql',1),('phabricator:050.taskdenormal.sql',1),('phabricator:051.projectfilter.sql',1),('phabricator:052.pastelanguage.sql',1),('phabricator:053.feed.sql',1),('phabricator:054.subscribers.sql',1),('phabricator:055.add_author_to_files.sql',1),('phabricator:056.slowvote.sql',1),('phabricator:057.parsecache.sql',1),('phabricator:058.missingkeys.sql',1),('phabricator:059.engines.php',1),('phabricator:060.phriction.sql',1),('phabricator:061.phrictioncontent.sql',1),('phabricator:062.phrictionmenu.sql',1),('phabricator:063.pasteforks.sql',1),('phabricator:064.subprojects.sql',1),('phabricator:065.sshkeys.sql',1),('phabricator:066.phrictioncontent.sql',1),('phabricator:067.preferences.sql',1),('phabricator:068.maniphestauxiliarystorage.sql',1),('phabricator:069.heraldxscript.sql',1),('phabricator:070.differentialaux.sql',1),('phabricator:071.contentsource.sql',1),('phabricator:072.blamerevert.sql',1),('phabricator:073.reposymbols.sql',1),('phabricator:074.affectedpath.sql',1),('phabricator:075.revisionhash.sql',1),('phabricator:076.indexedlanguages.sql',1),('phabricator:077.originalemail.sql',1),('phabricator:078.nametoken.sql',1),('phabricator:079.nametokenindex.php',1),('phabricator:080.filekeys.sql',1),('phabricator:081.filekeys.php',1),('phabricator:082.xactionkey.sql',1),('phabricator:083.dxviewtime.sql',1),('phabricator:084.pasteauthorkey.sql',1),('phabricator:085.packagecommitrelationship.sql',1),('phabricator:086.formeraffil.sql',1),('phabricator:087.phrictiondelete.sql',1),('phabricator:088.audit.sql',1),('phabricator:089.projectwiki.sql',1),('phabricator:090.forceuniqueprojectnames.php',1),('phabricator:091.uniqueslugkey.sql',1),('phabricator:092.dropgithubnotification.sql',1),('phabricator:093.gitremotes.php',1),('phabricator:094.phrictioncolumn.sql',1),('phabricator:095.directory.sql',1),('phabricator:096.filename.sql',1),('phabricator:097.heraldruletypes.sql',1),('phabricator:098.heraldruletypemigration.php',1),('phabricator:099.drydock.sql',1),('phabricator:100.projectxaction.sql',1),('phabricator:101.heraldruleapplied.sql',1),('phabricator:102.heraldcleanup.php',1),('phabricator:103.heraldedithistory.sql',1),('phabricator:104.searchkey.sql',1),('phabricator:105.mimetype.sql',1),('phabricator:106.chatlog.sql',1),('phabricator:107.oauthserver.sql',1),('phabricator:108.oauthscope.sql',1),('phabricator:109.oauthclientphidkey.sql',1),('phabricator:110.commitaudit.sql',1),('phabricator:111.commitauditmigration.php',1),('phabricator:112.oauthaccesscoderedirecturi.sql',1),('phabricator:113.lastreviewer.sql',1),('phabricator:114.auditrequest.sql',1),('phabricator:115.prepareutf8.sql',1),('phabricator:116.utf8-backup-first-expect-wait.sql',1),('phabricator:117.repositorydescription.php',1),('phabricator:118.auditinline.sql',1),('phabricator:119.filehash.sql',1),('phabricator:120.noop.sql',1),('phabricator:121.drydocklog.sql',1),('phabricator:122.flag.sql',1),('phabricator:123.heraldrulelog.sql',1),('phabricator:124.subpriority.sql',1),('phabricator:125.ipv6.sql',1),('phabricator:126.edges.sql',1),('phabricator:127.userkeybody.sql',1),('phabricator:128.phabricatorcom.sql',1),('phabricator:129.savedquery.sql',1),('phabricator:130.denormalrevisionquery.sql',1),('phabricator:131.migraterevisionquery.php',1),('phabricator:132.phame.sql',1),('phabricator:133.imagemacro.sql',1),('phabricator:134.emptysearch.sql',1),('phabricator:135.datecommitted.sql',1),('phabricator:136.sex.sql',1),('phabricator:137.auditmetadata.sql',1),('phabricator:db.audit',1),('phabricator:db.chatlog',1),('phabricator:db.conduit',1),('phabricator:db.countdown',1),('phabricator:db.daemon',1),('phabricator:db.differential',1),('phabricator:db.draft',1),('phabricator:db.drydock',1),('phabricator:db.feed',1),('phabricator:db.file',1),('phabricator:db.flag',1),('phabricator:db.herald',1),('phabricator:db.maniphest',1),('phabricator:db.metamta',1),('phabricator:db.meta_data',1),('phabricator:db.oauth_server',1),('phabricator:db.owners',1),('phabricator:db.pastebin',1),('phabricator:db.phame',1),('phabricator:db.phid',1),('phabricator:db.phriction',1),('phabricator:db.project',1),('phabricator:db.repository',1),('phabricator:db.search',1),('phabricator:db.slowvote',1),('phabricator:db.timeline',1),('phabricator:db.user',1),('phabricator:db.worker',1),('phabricator:db.xhpastview',1);
+
+CREATE DATABASE IF NOT EXISTS `{$NAMESPACE}_metamta` DEFAULT CHARACTER SET utf8;
+
+USE `{$NAMESPACE}_metamta`;
+
+CREATE TABLE `edge` (
+ `src` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `dst` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin 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`),
+ KEY `src` (`src`,`type`,`dateCreated`,`seq`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `edgedata` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `data` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `metamta_mail` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `parameters` longtext CHARACTER SET utf8 COLLATE utf8_bin 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 utf8 COLLATE utf8_bin DEFAULT NULL,
+ `dateCreated` int(10) unsigned NOT NULL,
+ `dateModified` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `status` (`status`,`nextRetry`),
+ KEY `relatedPHID` (`relatedPHID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `metamta_mailinglist` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `phid` varchar(64) CHARACTER SET utf8 COLLATE utf8_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`),
+ UNIQUE KEY `phid` (`phid`),
+ UNIQUE KEY `email` (`email`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `metamta_receivedmail` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `headers` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `bodies` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `attachments` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ `relatedPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `authorPHID` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `message` longtext CHARACTER SET utf8 COLLATE utf8_bin,
+ `dateCreated` int(10) unsigned NOT NULL,
+ `dateModified` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `relatedPHID` (`relatedPHID`),
+ KEY `authorPHID` (`authorPHID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE DATABASE IF NOT EXISTS `{$NAMESPACE}_oauth_server` DEFAULT CHARACTER SET utf8;