]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
[nginx] Use try_files instead of if for /.well-known/.
[friendica.git] / database.sql
index b3d8f5dd0502ffcee47d5534734851dcb65691e3..15f5a2f352cd1f1f735b0f4ef2448d6f0333adaf 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2018.08-dev (The Tazmans Flax-lily)
--- DB_UPDATE_VERSION 1274
+-- DB_UPDATE_VERSION 1276
 -- ------------------------------------------
 
 
@@ -478,6 +478,7 @@ CREATE TABLE IF NOT EXISTS `item` (
        `author-link` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the profile page of the author of this item',
        `author-avatar` varchar(255) NOT NULL DEFAULT '' COMMENT 'Link to the avatar picture of the author of this item',
        `icid` int unsigned COMMENT 'Id of the item-content table entry that contains the whole item content',
+       `iaid` int unsigned COMMENT 'Id of the item-activity table entry that contains the activity data',
        `title` varchar(255) NOT NULL DEFAULT '' COMMENT 'item title',
        `content-warning` varchar(255) NOT NULL DEFAULT '' COMMENT '',
        `body` mediumtext COMMENT 'item body content',
@@ -539,9 +540,23 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `deleted_changed` (`deleted`,`changed`),
         INDEX `uid_wall_changed` (`uid`,`wall`,`changed`),
         INDEX `uid_eventid` (`uid`,`event-id`),
-        INDEX `icid` (`icid`)
+        INDEX `icid` (`icid`),
+        INDEX `iaid` (`iaid`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Structure for all posts';
 
+--
+-- TABLE item-activity
+--
+CREATE TABLE IF NOT EXISTS `item-activity` (
+       `id` int unsigned NOT NULL auto_increment,
+       `uri` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+       `uri-hash` char(80) NOT NULL DEFAULT '' COMMENT 'SHA-1 and RIPEMD-160 hash from uri',
+       `activity` smallint unsigned NOT NULL DEFAULT 0 COMMENT '',
+        PRIMARY KEY(`id`),
+        UNIQUE INDEX `uri-hash` (`uri-hash`),
+        INDEX `uri` (`uri`(191))
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Activities for items';
+
 --
 -- TABLE item-content
 --
@@ -576,8 +591,10 @@ CREATE TABLE IF NOT EXISTS `locks` (
        `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
        `name` varchar(128) NOT NULL DEFAULT '' COMMENT '',
        `locked` boolean NOT NULL DEFAULT '0' COMMENT '',
+       `expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'datetime of lock expiration',
        `pid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Process ID',
-        PRIMARY KEY(`id`)
+        PRIMARY KEY(`id`),
+        INDEX `name_expires` (`name`,`expires`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='';
 
 --