+--
+-- TABLE 2fa_app_specific_password
+--
+CREATE TABLE IF NOT EXISTS `2fa_app_specific_password` (
+ `id` mediumint unsigned NOT NULL auto_increment COMMENT 'Password ID for revocation',
+ `uid` mediumint unsigned NOT NULL COMMENT 'User ID',
+ `description` varchar(255) COMMENT 'Description of the usage of the password',
+ `hashed_password` varchar(255) NOT NULL COMMENT 'Hashed password',
+ `generated` datetime NOT NULL COMMENT 'Datetime the password was generated',
+ `last_used` datetime COMMENT 'Datetime the password was last used',
+ PRIMARY KEY(`id`),
+ INDEX `uid_description` (`uid`,`description`(190))
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor app-specific _password';
+
+--
+-- TABLE 2fa_recovery_codes
+--
+CREATE TABLE IF NOT EXISTS `2fa_recovery_codes` (
+ `uid` mediumint unsigned NOT NULL COMMENT 'User ID',
+ `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`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Two-factor authentication recovery codes';
+