X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=48de2fcaef848dce71d36db99948010eb6d9dc6c;hb=c0447ced48cc7ea5e3cf9d870358ad1aa5a5f24d;hp=b76a4e0206005444354908fe7b2a978652fc39ae;hpb=f93418b2951e51e40bf516b6a0980bb889eb6c12;p=friendica.git diff --git a/database.sql b/database.sql index b76a4e0206..48de2fcaef 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2022.09-rc (Giant Rhubarb) --- DB_UPDATE_VERSION 1482 +-- DB_UPDATE_VERSION 1484 -- ------------------------------------------ @@ -309,6 +309,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-user +-- +CREATE TABLE IF NOT EXISTS `account-user` ( + `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', + `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', + PRIMARY KEY(`id`), + UNIQUE INDEX `uri-id_uid` (`uri-id`,`uid`), + INDEX `uid_uri-id` (`uid`,`uri-id`), + 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='Remote and local accounts'; + -- -- TABLE addon -- @@ -625,6 +639,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` ( `network` char(4) NOT NULL DEFAULT '' COMMENT '', `alias` varbinary(383) NOT NULL DEFAULT '' COMMENT '', `pubkey` text COMMENT '', + `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `interacting_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts this contact interactes with', `interacted_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts that interacted with this contact',