]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Issue 12302: Remote self is working again
[friendica.git] / database.sql
index 4e940b3197f9d3dc9f48abc91f84fbef337a6d3b..f41defe4284a1efd4f42a09adf53792e792cb897 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2022.12-dev (Giant Rhubarb)
--- DB_UPDATE_VERSION 1495
+-- DB_UPDATE_VERSION 1496
 -- ------------------------------------------
 
 
@@ -59,6 +59,7 @@ CREATE TABLE IF NOT EXISTS `user` (
        `language` varchar(32) NOT NULL DEFAULT 'en' COMMENT 'default language',
        `register_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp of registration',
        `login_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'timestamp of last login',
+       `last-activity` date COMMENT 'Day of the last activity',
        `default-location` varchar(255) NOT NULL DEFAULT '' COMMENT 'Default for item.location',
        `allow_location` boolean NOT NULL DEFAULT '0' COMMENT '1 allows to display the location',
        `theme` varchar(255) NOT NULL DEFAULT '' COMMENT 'user theme preference',
@@ -309,6 +310,20 @@ CREATE TABLE IF NOT EXISTS `2fa_trusted_browser` (
        FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor authentication trusted browsers';
 
+--
+-- TABLE account-suggestion
+--
+CREATE TABLE IF NOT EXISTS `account-suggestion` (
+       `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the account url',
+       `uid` mediumint unsigned NOT NULL COMMENT 'User ID',
+       `level` smallint unsigned COMMENT 'level of closeness',
+       `ignore` boolean NOT NULL DEFAULT '0' COMMENT 'If set, this account will not be suggested again',
+        PRIMARY KEY(`uid`,`uri-id`),
+        INDEX `uri-id_uid` (`uri-id`,`uid`),
+       FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
+       FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Account suggestion';
+
 --
 -- TABLE account-user
 --