X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=4a8a9d6fc886e7d1cf154a6d3e05ec423295ebf1;hb=b633d75e6c7c87a57367777703578b1d34dbffe3;hp=c9017fd2ef81230d2a0c986219d6d49739f5f930;hpb=1193b73125fc911ae508276cde69718cc4c7f3c3;p=friendica.git diff --git a/database.sql b/database.sql index c9017fd2ef..4a8a9d6fc8 100644 --- a/database.sql +++ b/database.sql @@ -283,10 +283,24 @@ CREATE TABLE IF NOT EXISTS `2fa_recovery_codes` ( `code` varchar(50) NOT NULL COMMENT 'Recovery code string', `generated` datetime NOT NULL COMMENT 'Datetime the code was generated', `used` datetime COMMENT 'Datetime the code was used', - PRIMARY KEY(`uid`,`code`), + PRIMARY KEY(`uid`,`code`), FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor authentication recovery codes'; +-- +-- TABLE 2fa_trusted_browser +-- +CREATE TABLE IF NOT EXISTS `2fa_trusted_browser` ( + `cookie_hash` varchar(80) NOT NULL COMMENT 'Trusted cookie hash', + `uid` mediumint unsigned NOT NULL COMMENT 'User ID', + `user_agent` text COMMENT 'User agent string', + `created` datetime NOT NULL COMMENT 'Datetime the trusted browser was recorded', + `last_used` datetime COMMENT 'Datetime the trusted browser was last used', + PRIMARY KEY(`cookie_hash`), + INDEX `uid` (`uid`), + FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor authentication trusted browsers'; + -- -- TABLE addon --