mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
New table "post-content"
This commit is contained in:
parent
8eb3bddc2a
commit
c3398511b4
15 changed files with 447 additions and 431 deletions
|
@ -55,7 +55,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1395);
|
||||
define('DB_UPDATE_VERSION', 1396);
|
||||
}
|
||||
|
||||
return [
|
||||
|
@ -858,55 +858,6 @@ return [
|
|||
"causer-id" => ["causer-id"],
|
||||
]
|
||||
],
|
||||
"item-activity" => [
|
||||
"comment" => "Activities for items",
|
||||
"fields" => [
|
||||
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
|
||||
"uri" => ["type" => "varchar(255)", "comment" => ""],
|
||||
"uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
|
||||
"uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
|
||||
"activity" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""]
|
||||
],
|
||||
"indexes" => [
|
||||
"PRIMARY" => ["id"],
|
||||
"uri-hash" => ["UNIQUE", "uri-hash"],
|
||||
"uri" => ["uri(191)"],
|
||||
"uri-id" => ["uri-id"]
|
||||
]
|
||||
],
|
||||
"item-content" => [
|
||||
"comment" => "Content for all posts",
|
||||
"fields" => [
|
||||
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
|
||||
"uri" => ["type" => "varchar(255)", "comment" => ""],
|
||||
"uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
|
||||
"uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
|
||||
"title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
|
||||
"content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"body" => ["type" => "mediumtext", "comment" => "item body content"],
|
||||
"raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
|
||||
"location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
|
||||
"coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
|
||||
"language" => ["type" => "text", "comment" => "Language information about this post"],
|
||||
"app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
|
||||
"rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
|
||||
"object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
|
||||
"object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
|
||||
"target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
|
||||
"target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
|
||||
"plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"],
|
||||
"verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams verb"]
|
||||
],
|
||||
"indexes" => [
|
||||
"PRIMARY" => ["id"],
|
||||
"uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
|
||||
"title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
|
||||
"uri" => ["uri(191)"],
|
||||
"plink" => ["plink(191)"],
|
||||
"uri-id" => ["uri-id"]
|
||||
]
|
||||
],
|
||||
"locks" => [
|
||||
"comment" => "",
|
||||
"fields" => [
|
||||
|
@ -1161,6 +1112,33 @@ return [
|
|||
"uid" => ["uid"],
|
||||
]
|
||||
],
|
||||
"post-content" => [
|
||||
"comment" => "Content for all posts",
|
||||
"fields" => [
|
||||
"uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
|
||||
"title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
|
||||
"content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"body" => ["type" => "mediumtext", "comment" => "item body content"],
|
||||
"raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"],
|
||||
"location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
|
||||
"coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
|
||||
"language" => ["type" => "text", "comment" => "Language information about this post"],
|
||||
"app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
|
||||
"rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
|
||||
"rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
|
||||
"object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
|
||||
"object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
|
||||
"target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
|
||||
"target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
|
||||
"resource-id" => ["type" => "varchar(32)", "not null" => "1", "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" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"]
|
||||
],
|
||||
"indexes" => [
|
||||
"PRIMARY" => ["uri-id"],
|
||||
"plink" => ["plink(191)"],
|
||||
"title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
|
||||
]
|
||||
],
|
||||
"post-delivery-data" => [
|
||||
"comment" => "Delivery data for items",
|
||||
"fields" => [
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
"commented" => ["item", "commented"],
|
||||
"received" => ["item", "received"],
|
||||
"changed" => ["item", "changed"],
|
||||
"resource-id" => ["item", "resource-id"],
|
||||
"post-type" => ["item", "post-type"],
|
||||
"private" => ["item", "private"],
|
||||
"pubmail" => ["item", "pubmail"],
|
||||
|
@ -78,21 +77,22 @@
|
|||
"vid" => ["item", "vid"],
|
||||
"psid" => ["item", "psid"],
|
||||
"verb" => "IF (`item`.`vid` IS NULL, '', `verb`.`name`)",
|
||||
"title" => ["item-content", "title"],
|
||||
"content-warning" => ["item-content", "content-warning"],
|
||||
"raw-body" => ["item-content", "raw-body"],
|
||||
"body" => ["item-content", "body"],
|
||||
"rendered-hash" => ["item-content", "rendered-hash"],
|
||||
"rendered-html" => ["item-content", "rendered-html"],
|
||||
"language" => ["item-content", "language"],
|
||||
"plink" => ["item-content", "plink"],
|
||||
"location" => ["item-content", "location"],
|
||||
"coord" => ["item-content", "coord"],
|
||||
"app" => ["item-content", "app"],
|
||||
"object-type" => ["item-content", "object-type"],
|
||||
"object" => ["item-content", "object"],
|
||||
"target-type" => ["item-content", "target-type"],
|
||||
"target" => ["item-content", "target"],
|
||||
"title" => ["post-content", "title"],
|
||||
"content-warning" => ["post-content", "content-warning"],
|
||||
"raw-body" => ["post-content", "raw-body"],
|
||||
"body" => ["post-content", "body"],
|
||||
"rendered-hash" => ["post-content", "rendered-hash"],
|
||||
"rendered-html" => ["post-content", "rendered-html"],
|
||||
"language" => ["post-content", "language"],
|
||||
"plink" => ["post-content", "plink"],
|
||||
"location" => ["post-content", "location"],
|
||||
"coord" => ["post-content", "coord"],
|
||||
"app" => ["post-content", "app"],
|
||||
"object-type" => ["post-content", "object-type"],
|
||||
"object" => ["post-content", "object"],
|
||||
"target-type" => ["post-content", "target-type"],
|
||||
"target" => ["post-content", "target"],
|
||||
"resource-id" => ["post-content", "resource-id"],
|
||||
"contact-id" => ["item", "contact-id"],
|
||||
"contact-link" => ["contact", "url"],
|
||||
"contact-addr" => ["contact", "addr"],
|
||||
|
@ -184,7 +184,7 @@
|
|||
LEFT JOIN `verb` ON `verb`.`id` = `item`.`vid`
|
||||
LEFT JOIN `event` ON `event`.`id` = `item`.`event-id`
|
||||
LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `item`.`uri-id`
|
||||
LEFT JOIN `item-content` ON `item-content`.`uri-id` = `item`.`uri-id`
|
||||
LEFT JOIN `post-content` ON `post-content`.`uri-id` = `item`.`uri-id`
|
||||
LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `item`.`uri-id` AND `item`.`origin`
|
||||
LEFT JOIN `permissionset` ON `permissionset`.`id` = `item`.`psid`
|
||||
STRAIGHT_JOIN `item` AS `parent-item` ON `parent-item`.`uri-id` = `item`.`parent-uri-id` AND `parent-item`.`uid` = `item`.`uid`
|
||||
|
@ -213,7 +213,6 @@
|
|||
"commented" => ["thread", "commented"],
|
||||
"received" => ["thread", "received"],
|
||||
"changed" => ["thread", "changed"],
|
||||
"resource-id" => ["item", "resource-id"],
|
||||
"post-type" => ["thread", "post-type"],
|
||||
"private" => ["thread", "private"],
|
||||
"pubmail" => ["thread", "pubmail"],
|
||||
|
@ -232,21 +231,22 @@
|
|||
"vid" => ["item", "vid"],
|
||||
"psid" => ["item", "psid"],
|
||||
"verb" => "IF (`item`.`vid` IS NULL, '', `verb`.`name`)",
|
||||
"title" => ["item-content", "title"],
|
||||
"content-warning" => ["item-content", "content-warning"],
|
||||
"raw-body" => ["item-content", "raw-body"],
|
||||
"body" => ["item-content", "body"],
|
||||
"rendered-hash" => ["item-content", "rendered-hash"],
|
||||
"rendered-html" => ["item-content", "rendered-html"],
|
||||
"language" => ["item-content", "language"],
|
||||
"plink" => ["item-content", "plink"],
|
||||
"location" => ["item-content", "location"],
|
||||
"coord" => ["item-content", "coord"],
|
||||
"app" => ["item-content", "app"],
|
||||
"object-type" => ["item-content", "object-type"],
|
||||
"object" => ["item-content", "object"],
|
||||
"target-type" => ["item-content", "target-type"],
|
||||
"target" => ["item-content", "target"],
|
||||
"title" => ["post-content", "title"],
|
||||
"content-warning" => ["post-content", "content-warning"],
|
||||
"raw-body" => ["post-content", "raw-body"],
|
||||
"body" => ["post-content", "body"],
|
||||
"rendered-hash" => ["post-content", "rendered-hash"],
|
||||
"rendered-html" => ["post-content", "rendered-html"],
|
||||
"language" => ["post-content", "language"],
|
||||
"plink" => ["post-content", "plink"],
|
||||
"location" => ["post-content", "location"],
|
||||
"coord" => ["post-content", "coord"],
|
||||
"app" => ["post-content", "app"],
|
||||
"object-type" => ["post-content", "object-type"],
|
||||
"object" => ["post-content", "object"],
|
||||
"target-type" => ["post-content", "target-type"],
|
||||
"target" => ["post-content", "target"],
|
||||
"resource-id" => ["post-content", "resource-id"],
|
||||
"contact-id" => ["thread", "contact-id"],
|
||||
"contact-link" => ["contact", "url"],
|
||||
"contact-addr" => ["contact", "addr"],
|
||||
|
@ -338,7 +338,7 @@
|
|||
LEFT JOIN `verb` ON `verb`.`id` = `item`.`vid`
|
||||
LEFT JOIN `event` ON `event`.`id` = `item`.`event-id`
|
||||
LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `thread`.`uri-id`
|
||||
LEFT JOIN `item-content` ON `item-content`.`uri-id` = `thread`.`uri-id`
|
||||
LEFT JOIN `post-content` ON `post-content`.`uri-id` = `thread`.`uri-id`
|
||||
LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `thread`.`uri-id` AND `thread`.`origin`
|
||||
LEFT JOIN `permissionset` ON `permissionset`.`id` = `item`.`psid`
|
||||
STRAIGHT_JOIN `item` AS `parent-item` ON `parent-item`.`id` = `item`.`parent`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue