X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=f598ab9ccb5363b9b5f5a7f0412766d41f7c25cd;hb=52e150551e4720fd8cb075e38af77f0190a06ed5;hp=46a2981e77244e5fc1129cd321ec39d2eba82e62;hpb=9870ab84464a8a13396962d8ce77571ac645b9cd;p=friendica.git diff --git a/database.sql b/database.sql index 46a2981e77..f598ab9ccb 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 2020.09-dev (Red Hot Poker) --- DB_UPDATE_VERSION 1366 +-- Friendica 2020.12-dev (Red Hot Poker) +-- DB_UPDATE_VERSION 1369 -- ------------------------------------------ @@ -585,6 +585,16 @@ CREATE TABLE IF NOT EXISTS `hook` ( UNIQUE INDEX `hook_file_function` (`hook`,`file`,`function`) ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='addon hook registry'; +-- +-- TABLE host +-- +CREATE TABLE IF NOT EXISTS `host` ( + `id` tinyint unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `name` varchar(128) NOT NULL DEFAULT '' COMMENT 'The hostname', + PRIMARY KEY(`id`), + UNIQUE INDEX `name` (`name`) +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Hostname'; + -- -- TABLE inbox-status -- @@ -644,6 +654,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network from where the item comes from', `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item', `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item', + `causer-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation', `icid` int unsigned COMMENT 'Id of the item-content table entry that contains the whole item content', `iaid` int unsigned COMMENT 'Id of the item-activity table entry that contains the activity data', `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs', @@ -729,9 +740,11 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `uri-id` (`uri-id`), INDEX `parent-uri-id` (`parent-uri-id`), INDEX `thr-parent-id` (`thr-parent-id`), + INDEX `causer-id` (`causer-id`), FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`causer-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT, FOREIGN KEY (`psid`) REFERENCES `permissionset` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Structure for all posts'; @@ -776,6 +789,7 @@ CREATE TABLE IF NOT EXISTS `item-content` ( `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`),