]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Improve display of quoted posts
[friendica.git] / database.sql
index 569997a4d8e20bf11b5489b270423dcefd5df854..4d1f3cd607bfbf998a8dfb12cf16d04f56739744 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2023.09-dev (Giant Rhubarb)
--- DB_UPDATE_VERSION 1519
+-- DB_UPDATE_VERSION 1522
 -- ------------------------------------------
 
 
@@ -190,7 +190,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
        `confirm` varbinary(383) COMMENT '',
        `poco` varbinary(383) COMMENT '',
        `writable` boolean NOT NULL DEFAULT '0' COMMENT '',
-       `forum` boolean NOT NULL DEFAULT '0' COMMENT 'contact is a forum. Deprecated, use \'contact-type\' = \'community\' and \'manually-approve\' = false instead',
+       `forum` boolean NOT NULL DEFAULT '0' COMMENT 'contact is a group. Deprecated, use \'contact-type\' = \'community\' and \'manually-approve\' = false instead',
        `prv` boolean NOT NULL DEFAULT '0' COMMENT 'contact is a private group. Deprecated, use \'contact-type\' = \'community\' and \'manually-approve\' = true instead',
        `bdyear` varchar(4) NOT NULL DEFAULT '' COMMENT '',
        `site-pubkey` text COMMENT 'Deprecated',
@@ -252,9 +252,9 @@ CREATE TABLE IF NOT EXISTS `permissionset` (
        `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
        `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner id of this permission set',
        `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'',
-       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups',
+       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles',
        `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id',
-       `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups',
+       `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles',
         PRIMARY KEY(`id`),
         INDEX `uid_allow_cid_allow_gid_deny_cid_deny_gid` (`uid`,`allow_cid`(50),`allow_gid`(30),`deny_cid`(50),`deny_gid`(30)),
        FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
@@ -457,9 +457,9 @@ CREATE TABLE IF NOT EXISTS `attach` (
        `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation time',
        `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'last edit time',
        `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>',
-       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups',
+       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles',
        `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id',
-       `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups',
+       `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles',
        `backend-class` tinytext COMMENT 'Storage backend class',
        `backend-ref` text COMMENT 'Storage backend data reference',
         PRIMARY KEY(`id`),
@@ -662,9 +662,9 @@ CREATE TABLE IF NOT EXISTS `event` (
        `nofinish` boolean NOT NULL DEFAULT '0' COMMENT 'if event does have no end this is 1',
        `ignore` boolean NOT NULL DEFAULT '0' COMMENT '0 or 1',
        `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'',
-       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups',
+       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles',
        `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id',
-       `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups',
+       `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles',
         PRIMARY KEY(`id`),
         INDEX `uid_start` (`uid`,`start`),
         INDEX `cid` (`cid`),
@@ -716,29 +716,29 @@ CREATE TABLE IF NOT EXISTS `group` (
        `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
        `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id',
        `visible` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the member list is not private',
-       `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the group has been deleted',
-       `cid` int unsigned COMMENT 'Contact id of forum. When this field is filled then the members are synced automatically.',
-       `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of group',
+       `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the circle has been deleted',
+       `cid` int unsigned COMMENT 'Contact id of group. When this field is filled then the members are synced automatically.',
+       `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of circle',
         PRIMARY KEY(`id`),
         INDEX `uid` (`uid`),
         INDEX `cid` (`cid`),
        FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
        FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, group info';
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy circles, circle info';
 
 --
 -- TABLE group_member
 --
 CREATE TABLE IF NOT EXISTS `group_member` (
        `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
-       `gid` int unsigned NOT NULL DEFAULT 0 COMMENT 'groups.id of the associated group',
-       `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id of the member assigned to the associated group',
+       `gid` int unsigned NOT NULL DEFAULT 0 COMMENT 'group.id of the associated circle',
+       `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id of the member assigned to the associated circle',
         PRIMARY KEY(`id`),
         INDEX `contactid` (`contact-id`),
         UNIQUE INDEX `gid_contactid` (`gid`,`contact-id`),
        FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
        FOREIGN KEY (`contact-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, member info';
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy circles, member info';
 
 --
 -- TABLE gserver-tag
@@ -1114,9 +1114,9 @@ CREATE TABLE IF NOT EXISTS `photo` (
        `scale` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '',
        `profile` boolean NOT NULL DEFAULT '0' COMMENT '',
        `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'',
-       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups',
+       `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles',
        `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id',
-       `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups',
+       `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles',
        `accessible` boolean NOT NULL DEFAULT '0' COMMENT 'Make photo publicly accessible, ignoring permissions',
        `backend-class` tinytext COMMENT 'Storage backend class',
        `backend-ref` text COMMENT 'Storage backend data reference',
@@ -1968,6 +1968,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `author`.`addr` AS `author-addr`,
        IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`,
        `author`.`nick` AS `author-nick`,
+       `author`.`alias` AS `author-alias`,
        IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`) AS `author-avatar`,
        `author`.`network` AS `author-network`,
        `author`.`blocked` AS `author-blocked`,
@@ -1980,6 +1981,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `owner`.`addr` AS `owner-addr`,
        IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`,
        `owner`.`nick` AS `owner-nick`,
+       `owner`.`alias` AS `owner-alias`,
        IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`) AS `owner-avatar`,
        `owner`.`network` AS `owner-network`,
        `owner`.`blocked` AS `owner-blocked`,
@@ -1992,6 +1994,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `causer`.`addr` AS `causer-addr`,
        `causer`.`name` AS `causer-name`,
        `causer`.`nick` AS `causer-nick`,
+       `causer`.`alias` AS `causer-alias`,
        `causer`.`thumb` AS `causer-avatar`,
        `causer`.`network` AS `causer-network`,
        `causer`.`blocked` AS `causer-blocked`,
@@ -2145,6 +2148,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `author`.`addr` AS `author-addr`,
        IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`) AS `author-name`,
        `author`.`nick` AS `author-nick`,
+       `author`.`alias` AS `author-alias`,
        IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`) AS `author-avatar`,
        `author`.`network` AS `author-network`,
        `author`.`blocked` AS `author-blocked`,
@@ -2157,6 +2161,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `owner`.`addr` AS `owner-addr`,
        IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`) AS `owner-name`,
        `owner`.`nick` AS `owner-nick`,
+       `owner`.`alias` AS `owner-alias`,
        IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`) AS `owner-avatar`,
        `owner`.`network` AS `owner-network`,
        `owner`.`blocked` AS `owner-blocked`,
@@ -2169,6 +2174,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `causer`.`addr` AS `causer-addr`,
        `causer`.`name` AS `causer-name`,
        `causer`.`nick` AS `causer-nick`,
+       `causer`.`alias` AS `causer-alias`,
        `causer`.`thumb` AS `causer-avatar`,
        `causer`.`network` AS `causer-network`,
        `causer`.`blocked` AS `causer-blocked`,
@@ -2308,6 +2314,7 @@ CREATE VIEW `post-view` AS SELECT
        `author`.`addr` AS `author-addr`,
        `author`.`name` AS `author-name`,
        `author`.`nick` AS `author-nick`,
+       `author`.`alias` AS `author-alias`,
        `author`.`thumb` AS `author-avatar`,
        `author`.`network` AS `author-network`,
        `author`.`blocked` AS `author-blocked`,
@@ -2320,6 +2327,7 @@ CREATE VIEW `post-view` AS SELECT
        `owner`.`addr` AS `owner-addr`,
        `owner`.`name` AS `owner-name`,
        `owner`.`nick` AS `owner-nick`,
+       `owner`.`alias` AS `owner-alias`,
        `owner`.`thumb` AS `owner-avatar`,
        `owner`.`network` AS `owner-network`,
        `owner`.`blocked` AS `owner-blocked`,
@@ -2332,6 +2340,7 @@ CREATE VIEW `post-view` AS SELECT
        `causer`.`addr` AS `causer-addr`,
        `causer`.`name` AS `causer-name`,
        `causer`.`nick` AS `causer-nick`,
+       `causer`.`alias` AS `causer-alias`,
        `causer`.`thumb` AS `causer-avatar`,
        `causer`.`network` AS `causer-network`,
        `causer`.`blocked` AS `causer-blocked`,
@@ -2448,6 +2457,7 @@ CREATE VIEW `post-thread-view` AS SELECT
        `author`.`addr` AS `author-addr`,
        `author`.`name` AS `author-name`,
        `author`.`nick` AS `author-nick`,
+       `author`.`alias` AS `author-alias`,
        `author`.`thumb` AS `author-avatar`,
        `author`.`network` AS `author-network`,
        `author`.`blocked` AS `author-blocked`,
@@ -2460,6 +2470,7 @@ CREATE VIEW `post-thread-view` AS SELECT
        `owner`.`addr` AS `owner-addr`,
        `owner`.`name` AS `owner-name`,
        `owner`.`nick` AS `owner-nick`,
+       `owner`.`alias` AS `owner-alias`,
        `owner`.`thumb` AS `owner-avatar`,
        `owner`.`network` AS `owner-network`,
        `owner`.`blocked` AS `owner-blocked`,
@@ -2472,6 +2483,7 @@ CREATE VIEW `post-thread-view` AS SELECT
        `causer`.`addr` AS `causer-addr`,
        `causer`.`name` AS `causer-name`,
        `causer`.`nick` AS `causer-nick`,
+       `causer`.`alias` AS `causer-alias`,
        `causer`.`thumb` AS `causer-avatar`,
        `causer`.`network` AS `causer-network`,
        `causer`.`blocked` AS `causer-blocked`,