From f61266cd7dbc472e307f76f8e81aceb98c915b31 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Fri, 17 Jan 2025 10:43:20 +0000 Subject: [PATCH] see https://github.com/postfixadmin/postfixadmin/issues/891 - fix addition of mailbox.smtp_active to work on postgresql, add {BOOLEAN_TRUE} placeholder for mysql (not sure how this did not exist) --- public/upgrade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/upgrade.php b/public/upgrade.php index 569e64b0..f2ccc9a6 100644 --- a/public/upgrade.php +++ b/public/upgrade.php @@ -257,6 +257,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") '{UNSIGNED}' => 'unsigned' , '{FULLTEXT}' => 'FULLTEXT', '{BOOLEAN}' => "tinyint(1) NOT NULL DEFAULT '" . db_get_boolean(false) . "'", + '{BOOLEAN_TRUE}' => "tinyint(1) NOT NULL DEFAULT '" . db_get_boolean(true) . "'", '{UTF-8}' => '/*!40100 CHARACTER SET utf8mb4 */', '{LATIN1}' => '/*!40100 CHARACTER SET latin1 COLLATE latin1_general_ci */', '{IF_NOT_EXISTS}' => 'IF NOT EXISTS', @@ -2352,5 +2353,7 @@ function upgrade_1849_sqlite() function upgrade_1850() { - _db_add_field('mailbox', 'smtp_active', 'int DEFAULT 1'); + // see also: https://github.com/postfixadmin/postfixadmin/issues/891 + _db_add_field('mailbox', 'smtp_active', '{BOOLEAN_TRUE}'); } +