]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Move /parse_url module to /parseurl
[friendica.git] / database.sql
index db1d90420b710ace8a807b1d0cee5a58c7691803..da32e1be6fa55c9093c6f00e22b4634040ba115e 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2021.03-dev (Red Hot Poker)
--- DB_UPDATE_VERSION 1401
+-- DB_UPDATE_VERSION 1403
 -- ------------------------------------------
 
 
@@ -959,15 +959,17 @@ CREATE TABLE IF NOT EXISTS `openwebauth-token` (
 -- TABLE parsed_url
 --
 CREATE TABLE IF NOT EXISTS `parsed_url` (
-       `url` varbinary(255) NOT NULL COMMENT 'page url',
+       `url_hash` binary(64) NOT NULL COMMENT 'page url hash',
        `guessing` boolean NOT NULL DEFAULT '0' COMMENT 'is the \'guessing\' mode active?',
        `oembed` boolean NOT NULL DEFAULT '0' COMMENT 'is the data the result of oembed?',
+       `url` text NOT NULL COMMENT 'page url',
        `content` mediumtext COMMENT 'page data',
        `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of creation',
-        PRIMARY KEY(`url`,`guessing`,`oembed`),
-        INDEX `created` (`created`)
+       `expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of expiration',
+       PRIMARY KEY(`url_hash`,`guessing`,`oembed`),
+       INDEX `created` (`created`),
+       INDEX `expires` (`expires`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='cache for \'parse_url\' queries';
-
 --
 -- TABLE pconfig
 --
@@ -1231,11 +1233,11 @@ CREATE TABLE IF NOT EXISTS `post-user` (
         INDEX `uid_hidden` (`uid`,`hidden`),
         INDEX `event-id` (`event-id`),
         INDEX `uid_wall` (`uid`,`wall`),
-        INDEX `parent-uri-id` (`parent-uri-id`),
+        INDEX `parent-uri-id_uid` (`parent-uri-id`,`uid`),
         INDEX `thr-parent-id` (`thr-parent-id`),
         INDEX `external-id` (`external-id`),
         INDEX `owner-id` (`owner-id`),
-        INDEX `author-id` (`author-id`),
+        INDEX `author-id_uid` (`author-id`,`uid`),
         INDEX `causer-id` (`causer-id`),
         INDEX `vid` (`vid`),
         INDEX `uid_received` (`uid`,`received`),
@@ -1615,6 +1617,7 @@ CREATE VIEW `post-view` AS SELECT
        `post-user`.`unseen` AS `unseen`,
        `post-user`.`deleted` AS `deleted`,
        `post-user`.`origin` AS `origin`,
+       `post-thread-user`.`origin` AS `parent-origin`,
        `post-thread-user`.`forum_mode` AS `forum_mode`,
        `post-thread-user`.`mention` AS `mention`,
        `post-user`.`global` AS `global`,