---
--- 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`),
- FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
-) 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',
- `raw-body` mediumtext COMMENT 'Body without embedded media links',
- `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`),
- FULLTEXT INDEX `title-content-warning-body` (`title`,`content-warning`,`body`),
- INDEX `uri` (`uri`(191)),
- INDEX `plink` (`plink`(191)),
- INDEX `uri-id` (`uri-id`),
- FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Content for all posts';
-