From dce68cdf50246338fb82d958641b7b60b2266426 Mon Sep 17 00:00:00 2001 From: James Lucas III Date: Sun, 23 Feb 2025 15:21:27 -0500 Subject: [PATCH] Update upgrade.php (#906) fix upgrade.php - admin.totp_secret field was not being added in the right place which caused an error. see also #899, thanks @jimlucas --- public/upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/upgrade.php b/public/upgrade.php index 31459f7b..b9db2873 100644 --- a/public/upgrade.php +++ b/public/upgrade.php @@ -2270,7 +2270,7 @@ function upgrade_1848_sqlite() function upgrade_1849_mysql() { _db_add_field('mailbox', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'password_expiry'); - _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'vacation_notification'); + _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'token_validity'); $totp_exception_table = table_by_key('totp_exception_address'); db_query_parsed(" @@ -2300,7 +2300,7 @@ function upgrade_1849_mysql() function upgrade_1849_pgsql() { _db_add_field('mailbox', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'password_expiry'); - _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'vacation_notification'); + _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'token_validity'); if (!_pgsql_object_exists('totp_exception_address')) { db_query_parsed(" @@ -2330,7 +2330,7 @@ function upgrade_1849_pgsql() function upgrade_1849_sqlite() { _db_add_field('mailbox', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'password_expiry'); - _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'vacation_notification'); + _db_add_field('admin', 'totp_secret', "VARCHAR(255) {UTF-8} DEFAULT NULL", 'token_validity'); db_query_parsed(" CREATE TABLE {IF_NOT_EXISTS} totp_exception_address ( id {AUTOINCREMENT},