Use the post-counts table to display content (#13781)

* Use the post-counts table to display content

* Use verb instead of vid

* Use verb

* Update counter on delete
This commit is contained in:
Michael Vogel
2023-12-31 12:50:07 +01:00
committed by GitHub
parent 0c68a53e1e
commit 8fc96477e7
12 changed files with 250 additions and 126 deletions
+15 -1
View File
@@ -1,6 +1,6 @@
-- ------------------------------------------
-- Friendica 2024.03-dev (Yellow Archangel)
-- DB_UPDATE_VERSION 1543
-- DB_UPDATE_VERSION 1544
-- ------------------------------------------
@@ -2025,6 +2025,20 @@ CREATE VIEW `circle-member-view` AS SELECT
INNER JOIN `contact` ON `group_member`.`contact-id` = `contact`.`id`
INNER JOIN `group` ON `group_member`.`gid` = `group`.`id`;
--
-- VIEW post-counts-view
--
DROP VIEW IF EXISTS `post-counts-view`;
CREATE VIEW `post-counts-view` AS SELECT
`post-counts`.`uri-id` AS `uri-id`,
`post-counts`.`vid` AS `vid`,
`verb`.`name` AS `verb`,
`post-counts`.`reaction` AS `reaction`,
`post-counts`.`parent-uri-id` AS `parent-uri-id`,
`post-counts`.`count` AS `count`
FROM `post-counts`
INNER JOIN `verb` ON `verb`.`id` = `post-counts`.`vid`;
--
-- VIEW post-timeline-view
--