+ INDEX `icid` (`icid`),
+ INDEX `iaid` (`iaid`),
+ INDEX `psid_wall` (`psid`,`wall`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Structure for all posts';
+
+--
+-- TABLE item-activity
+--
+CREATE TABLE IF NOT EXISTS `item-activity` (
+ `id` int unsigned NOT NULL auto_increment,
+ `uri` varchar(255) COMMENT '',
+ `uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the item uri',
+ `uri-hash` varchar(80) NOT NULL DEFAULT '' COMMENT 'RIPEMD-128 hash from uri',
+ `activity` smallint unsigned NOT NULL DEFAULT 0 COMMENT '',
+ PRIMARY KEY(`id`),
+ UNIQUE INDEX `uri-hash` (`uri-hash`),
+ INDEX `uri` (`uri`(191)),
+ INDEX `uri-id` (`uri-id`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Activities for items';
+
+--
+-- TABLE item-content
+--
+CREATE TABLE IF NOT EXISTS `item-content` (
+ `id` int unsigned NOT NULL auto_increment,
+ `uri` varchar(255) COMMENT '',
+ `uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the item uri',
+ `uri-plink-hash` varchar(80) NOT NULL DEFAULT '' COMMENT 'RIPEMD-128 hash from uri',
+ `title` varchar(255) NOT NULL DEFAULT '' COMMENT 'item title',
+ `content-warning` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `body` mediumtext COMMENT 'item body content',
+ `location` varchar(255) NOT NULL DEFAULT '' COMMENT 'text location where this item originated',
+ `coord` varchar(255) NOT NULL DEFAULT '' COMMENT 'longitude/latitude pair representing location where this item originated',
+ `language` text COMMENT 'Language information about this post',
+ `app` varchar(255) NOT NULL DEFAULT '' COMMENT 'application which generated this item',
+ `rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '',
+ `rendered-html` mediumtext COMMENT 'item.body converted to html',
+ `object-type` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams object type',
+ `object` text COMMENT 'JSON encoded object structure unless it is an implied object (normal post)',
+ `target-type` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams target type if applicable (URI)',
+ `target` text COMMENT 'JSON encoded target structure if used',
+ `plink` varchar(255) NOT NULL DEFAULT '' COMMENT 'permalink or URL to a displayable copy of the message at its source',
+ `verb` varchar(100) NOT NULL DEFAULT '' COMMENT 'ActivityStreams verb',
+ PRIMARY KEY(`id`),
+ UNIQUE INDEX `uri-plink-hash` (`uri-plink-hash`),
+ INDEX `uri` (`uri`(191)),
+ INDEX `uri-id` (`uri-id`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Content for all posts';
+
+--
+-- TABLE item-delivery-data
+--
+CREATE TABLE IF NOT EXISTS `item-delivery-data` (
+ `iid` int unsigned NOT NULL COMMENT 'Item id',
+ `postopts` text COMMENT 'External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery',
+ `inform` mediumtext COMMENT 'Additional receivers of the linked item',
+ PRIMARY KEY(`iid`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Delivery data for items';
+
+--
+-- TABLE item-uri
+--
+CREATE TABLE IF NOT EXISTS `item-uri` (
+ `id` int unsigned NOT NULL auto_increment,
+ `uri` varbinary(255) NOT NULL COMMENT 'URI of an item',
+ `guid` varbinary(255) COMMENT 'A unique identifier for an item',
+ PRIMARY KEY(`id`),
+ UNIQUE INDEX `uri` (`uri`),
+ INDEX `guid` (`guid`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='URI and GUID for items';