X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=42a6c1f2e6210c3ce7ee9c1cf7a222d4239ea714;hb=cd3f2f63d6dc11dedc8809a4217cd194f6b9631c;hp=4c404356f6c6b16bff7a3763e233a2e8d7e4680f;hpb=dffd28cf2076721c935dc000a107bbb04ef70b3a;p=friendica.git diff --git a/database.sql b/database.sql index 4c404356f6..42a6c1f2e6 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 2023.03-dev (Giant Rhubarb) --- DB_UPDATE_VERSION 1516 +-- Friendica 2023.03-rc (Giant Rhubarb) +-- DB_UPDATE_VERSION 1518 -- ------------------------------------------ @@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `verified` boolean NOT NULL DEFAULT '0' COMMENT 'user is verified through email', `blocked` boolean NOT NULL DEFAULT '0' COMMENT '1 for user is blocked', `blockwall` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to post to the profile page of the user', - `hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unkown viewers', + `hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unknown viewers', `blocktags` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to tag the post of this user', `unkmail` boolean NOT NULL DEFAULT '0' COMMENT 'Permit unknown people to send private mails to this user', `cntunkmail` int unsigned NOT NULL DEFAULT 10 COMMENT '', @@ -608,7 +608,7 @@ CREATE TABLE IF NOT EXISTS `diaspora-contact` ( `gsid` int unsigned COMMENT 'Global Server ID', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `interacting_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts this contact interactes with', + `interacting_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts this contact interacts with', `interacted_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts that interacted with this contact', `post_count` int unsigned DEFAULT 0 COMMENT 'Number of posts and comments', PRIMARY KEY(`uri-id`), @@ -880,7 +880,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( `guid` varbinary(255) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this private message', `from-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name of the sender', `from-photo` varbinary(383) NOT NULL DEFAULT '' COMMENT 'contact photo link of the sender', - `from-url` varbinary(383) NOT NULL DEFAULT '' COMMENT 'profile linke of the sender', + `from-url` varbinary(383) NOT NULL DEFAULT '' COMMENT 'profile link of the sender', `contact-id` varbinary(255) COMMENT 'contact.id', `author-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the author of the mail', `convid` int unsigned COMMENT 'conv.id', @@ -1570,7 +1570,7 @@ CREATE TABLE IF NOT EXISTS `post-user-notification` ( -- CREATE TABLE IF NOT EXISTS `process` ( `pid` int unsigned NOT NULL COMMENT 'The ID of the process', - `hostname` varchar(32) NOT NULL COMMENT 'The name of the host the process is ran on', + `hostname` varchar(255) NOT NULL COMMENT 'The name of the host the process is ran on', `command` varbinary(32) NOT NULL DEFAULT '' COMMENT '', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', PRIMARY KEY(`pid`,`hostname`), @@ -1855,7 +1855,7 @@ CREATE TABLE IF NOT EXISTS `worker-ipc` ( -- VIEW application-view -- DROP VIEW IF EXISTS `application-view`; -CREATE VIEW `application-view` AS SELECT +CREATE VIEW `application-view` AS SELECT `application`.`id` AS `id`, `application-token`.`uid` AS `uid`, `application`.`name` AS `name`, @@ -1878,7 +1878,7 @@ CREATE VIEW `application-view` AS SELECT -- VIEW post-user-view -- DROP VIEW IF EXISTS `post-user-view`; -CREATE VIEW `post-user-view` AS SELECT +CREATE VIEW `post-user-view` AS SELECT `post-user`.`id` AS `id`, `post-user`.`id` AS `post-user-id`, `post-user`.`uid` AS `uid`, @@ -2057,7 +2057,7 @@ CREATE VIEW `post-user-view` AS SELECT -- VIEW post-thread-user-view -- DROP VIEW IF EXISTS `post-thread-user-view`; -CREATE VIEW `post-thread-user-view` AS SELECT +CREATE VIEW `post-thread-user-view` AS SELECT `post-user`.`id` AS `id`, `post-user`.`id` AS `post-user-id`, `post-thread-user`.`uid` AS `uid`, @@ -2234,7 +2234,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT -- VIEW post-view -- DROP VIEW IF EXISTS `post-view`; -CREATE VIEW `post-view` AS SELECT +CREATE VIEW `post-view` AS SELECT `item-uri`.`uri` AS `uri`, `post`.`uri-id` AS `uri-id`, `parent-item-uri`.`uri` AS `parent-uri`, @@ -2374,7 +2374,7 @@ CREATE VIEW `post-view` AS SELECT -- VIEW post-thread-view -- DROP VIEW IF EXISTS `post-thread-view`; -CREATE VIEW `post-thread-view` AS SELECT +CREATE VIEW `post-thread-view` AS SELECT `item-uri`.`uri` AS `uri`, `post-thread`.`uri-id` AS `uri-id`, `parent-item-uri`.`uri` AS `parent-uri`, @@ -2516,7 +2516,7 @@ CREATE VIEW `post-thread-view` AS SELECT -- VIEW category-view -- DROP VIEW IF EXISTS `category-view`; -CREATE VIEW `category-view` AS SELECT +CREATE VIEW `category-view` AS SELECT `post-category`.`uri-id` AS `uri-id`, `post-category`.`uid` AS `uid`, `post-category`.`type` AS `type`, @@ -2530,7 +2530,7 @@ CREATE VIEW `category-view` AS SELECT -- VIEW collection-view -- DROP VIEW IF EXISTS `collection-view`; -CREATE VIEW `collection-view` AS SELECT +CREATE VIEW `collection-view` AS SELECT `post-collection`.`uri-id` AS `uri-id`, `post-collection`.`type` AS `type`, `post-collection`.`author-id` AS `cid`, @@ -2551,7 +2551,7 @@ CREATE VIEW `collection-view` AS SELECT -- VIEW media-view -- DROP VIEW IF EXISTS `media-view`; -CREATE VIEW `media-view` AS SELECT +CREATE VIEW `media-view` AS SELECT `post-media`.`uri-id` AS `uri-id`, `post-media`.`type` AS `type`, `post`.`received` AS `received`, @@ -2569,7 +2569,7 @@ CREATE VIEW `media-view` AS SELECT -- VIEW tag-view -- DROP VIEW IF EXISTS `tag-view`; -CREATE VIEW `tag-view` AS SELECT +CREATE VIEW `tag-view` AS SELECT `post-tag`.`uri-id` AS `uri-id`, `post-tag`.`type` AS `type`, `post-tag`.`tid` AS `tid`, @@ -2585,7 +2585,7 @@ CREATE VIEW `tag-view` AS SELECT -- VIEW network-item-view -- DROP VIEW IF EXISTS `network-item-view`; -CREATE VIEW `network-item-view` AS SELECT +CREATE VIEW `network-item-view` AS SELECT `post-user`.`uri-id` AS `uri-id`, `parent-post`.`id` AS `parent`, `post-user`.`received` AS `received`, @@ -2600,7 +2600,7 @@ CREATE VIEW `network-item-view` AS SELECT `post-user`.`contact-id` AS `contact-id`, `ownercontact`.`contact-type` AS `contact-type` FROM `post-user` - STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid` + STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid` INNER JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id` LEFT JOIN `user-contact` AS `author` ON `author`.`uid` = `post-thread-user`.`uid` AND `author`.`cid` = `post-thread-user`.`author-id` LEFT JOIN `user-contact` AS `owner` ON `owner`.`uid` = `post-thread-user`.`uid` AND `owner`.`cid` = `post-thread-user`.`owner-id` @@ -2616,7 +2616,7 @@ CREATE VIEW `network-item-view` AS SELECT -- VIEW network-thread-view -- DROP VIEW IF EXISTS `network-thread-view`; -CREATE VIEW `network-thread-view` AS SELECT +CREATE VIEW `network-thread-view` AS SELECT `post-thread-user`.`uri-id` AS `uri-id`, `parent-post`.`id` AS `parent`, `post-thread-user`.`received` AS `received`, @@ -2645,7 +2645,7 @@ CREATE VIEW `network-thread-view` AS SELECT -- VIEW owner-view -- DROP VIEW IF EXISTS `owner-view`; -CREATE VIEW `owner-view` AS SELECT +CREATE VIEW `owner-view` AS SELECT `contact`.`id` AS `id`, `contact`.`uid` AS `uid`, `contact`.`created` AS `created`, @@ -2775,7 +2775,7 @@ CREATE VIEW `owner-view` AS SELECT -- VIEW account-view -- DROP VIEW IF EXISTS `account-view`; -CREATE VIEW `account-view` AS SELECT +CREATE VIEW `account-view` AS SELECT `contact`.`id` AS `id`, `contact`.`url` AS `url`, `contact`.`nurl` AS `nurl`, @@ -2849,7 +2849,9 @@ CREATE VIEW `account-view` AS SELECT `apcontact`.`statuses_count` AS `ap-statuses_count`, `gserver`.`site_name` AS `site_name`, `gserver`.`platform` AS `platform`, - `gserver`.`version` AS `version` + `gserver`.`version` AS `version`, + `gserver`.`blocked` AS `server-blocked`, + `gserver`.`failed` AS `server-failed` FROM `contact` LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id` LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id` @@ -2861,7 +2863,7 @@ CREATE VIEW `account-view` AS SELECT -- VIEW account-user-view -- DROP VIEW IF EXISTS `account-user-view`; -CREATE VIEW `account-user-view` AS SELECT +CREATE VIEW `account-user-view` AS SELECT `ucontact`.`id` AS `id`, `contact`.`id` AS `pid`, `ucontact`.`uid` AS `uid`, @@ -2953,7 +2955,9 @@ CREATE VIEW `account-user-view` AS SELECT `apcontact`.`statuses_count` AS `ap-statuses_count`, `gserver`.`site_name` AS `site_name`, `gserver`.`platform` AS `platform`, - `gserver`.`version` AS `version` + `gserver`.`version` AS `version`, + `gserver`.`blocked` AS `server-blocked`, + `gserver`.`failed` AS `server-failed` FROM `contact` AS `ucontact` INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0 LEFT JOIN `item-uri` ON `item-uri`.`id` = `ucontact`.`uri-id` @@ -2965,7 +2969,7 @@ CREATE VIEW `account-user-view` AS SELECT -- VIEW pending-view -- DROP VIEW IF EXISTS `pending-view`; -CREATE VIEW `pending-view` AS SELECT +CREATE VIEW `pending-view` AS SELECT `register`.`id` AS `id`, `register`.`hash` AS `hash`, `register`.`created` AS `created`, @@ -2987,7 +2991,7 @@ CREATE VIEW `pending-view` AS SELECT -- VIEW tag-search-view -- DROP VIEW IF EXISTS `tag-search-view`; -CREATE VIEW `tag-search-view` AS SELECT +CREATE VIEW `tag-search-view` AS SELECT `post-tag`.`uri-id` AS `uri-id`, `post-user`.`uid` AS `uid`, `post-user`.`id` AS `iid`, @@ -3009,7 +3013,7 @@ CREATE VIEW `tag-search-view` AS SELECT -- VIEW workerqueue-view -- DROP VIEW IF EXISTS `workerqueue-view`; -CREATE VIEW `workerqueue-view` AS SELECT +CREATE VIEW `workerqueue-view` AS SELECT `process`.`pid` AS `pid`, `workerqueue`.`priority` AS `priority` FROM `process` @@ -3020,7 +3024,7 @@ CREATE VIEW `workerqueue-view` AS SELECT -- VIEW profile_field-view -- DROP VIEW IF EXISTS `profile_field-view`; -CREATE VIEW `profile_field-view` AS SELECT +CREATE VIEW `profile_field-view` AS SELECT `profile_field`.`id` AS `id`, `profile_field`.`uid` AS `uid`, `profile_field`.`label` AS `label`, @@ -3040,7 +3044,7 @@ CREATE VIEW `profile_field-view` AS SELECT -- VIEW diaspora-contact-view -- DROP VIEW IF EXISTS `diaspora-contact-view`; -CREATE VIEW `diaspora-contact-view` AS SELECT +CREATE VIEW `diaspora-contact-view` AS SELECT `diaspora-contact`.`uri-id` AS `uri-id`, `item-uri`.`uri` AS `url`, `item-uri`.`guid` AS `guid`,