mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 22:17:17 +02:00
Issue 11472: Store the "edit" history
This commit is contained in:
parent
6f70d21e07
commit
324cce7a19
7 changed files with 165 additions and 4 deletions
28
database.sql
28
database.sql
|
@ -1,6 +1,6 @@
|
|||
-- ------------------------------------------
|
||||
-- Friendica 2022.05-rc (Siberian Iris)
|
||||
-- DB_UPDATE_VERSION 1462
|
||||
-- DB_UPDATE_VERSION 1463
|
||||
-- ------------------------------------------
|
||||
|
||||
|
||||
|
@ -1155,6 +1155,32 @@ CREATE TABLE IF NOT EXISTS `post-delivery-data` (
|
|||
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Delivery data for items';
|
||||
|
||||
--
|
||||
-- TABLE post-history
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `post-history` (
|
||||
`uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri',
|
||||
`edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of edit',
|
||||
`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',
|
||||
`resource-id` varchar(32) NOT NULL DEFAULT '' COMMENT 'Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type',
|
||||
`plink` varchar(255) NOT NULL DEFAULT '' COMMENT 'permalink or URL to a displayable copy of the message at its source',
|
||||
PRIMARY KEY(`uri-id`,`edited`),
|
||||
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Post history';
|
||||
|
||||
--
|
||||
-- TABLE post-link
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue