]> git.mxchange.org Git - friendica.git/blobdiff - static/dbview.config.php
Fix several database issues
[friendica.git] / static / dbview.config.php
index 79a2407f4a97d46efb13c1debf1bc21281c048b6..fcd04c96822da61ec7e8b92df789d12e4fdfee24 100644 (file)
                "fields" => [
                        "id" => ["post-user", "id"],
                        "item-id" => ["item", "id"],
-                       "iid" => ["post-user", "id"],
                        "post-user-id" => ["post-user", "id"],
                        "uid" => ["post-thread-user", "uid"],
                        "parent" => ["parent-post", "id"],
        "network-item-view" => [
                "fields" => [
                        "uri-id" => ["post-user", "uri-id"],
-                       "parent" => ["post-user", "parent-uri-id"],
+                       "parent" => ["parent-post", "id"],
                        "received" => ["post-user", "received"],
                        "commented" => ["post-thread-user", "commented"],
                        "created" => ["post-user", "created"],
                        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`
                        INNER JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
+                       LEFT JOIN `post-user` AS `parent-post` ON `parent-post`.`uri-id` = `post-user`.`parent-uri-id` AND `parent-post`.`uid` = `post-user`.`uid`
                        WHERE `post-user`.`visible` AND NOT `post-user`.`deleted`
                        AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`)
                        AND (`post-user`.`hidden` IS NULL OR NOT `post-user`.`hidden`)
        "network-thread-view" => [
                "fields" => [
                        "uri-id" => ["post-thread-user", "uri-id"],
-                       "parent" => ["post-user", "parent-uri-id"],
+                       "parent" => ["parent-post", "id"],
                        "received" => ["post-thread-user", "received"],
                        "commented" => ["post-thread-user", "commented"],
                        "created" => ["post-thread-user", "created"],
                        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`
                        LEFT JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
+                       LEFT JOIN `post-user` AS `parent-post` ON `parent-post`.`uri-id` = `post-user`.`parent-uri-id` AND `parent-post`.`uid` = `post-user`.`uid`
                        WHERE `post-user`.`visible` AND NOT `post-user`.`deleted`
                        AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`)
                        AND (`post-thread-user`.`hidden` IS NULL OR NOT `post-thread-user`.`hidden`)
                "fields" => [
                        "uri-id" => ["post-tag", "uri-id"],
                        "uid" => ["post-user", "uid"],
+                       "iid" => ["post-user", "id"],
                        "private" => ["post-user", "private"],
                        "wall" => ["post-user", "wall"],
                        "origin" => ["post-user", "origin"],