From cd31617e216243be50756dd0b7597abc19ca58a9 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Tue, 23 Jun 2026 11:27:04 -0500 Subject: [PATCH] fix: change include_mokorestore column from TINYINT to VARCHAR(20) The column was TINYINT(1) which can only store 0/1. The new 'standalone' mode value causes MySQL to truncate the string to 0, breaking profile save. Changed to VARCHAR(20) to support all three modes: '0' (none), '1' (wrapped), 'standalone'. --- source/packages/com_mokosuitebackup/sql/install.mysql.sql | 2 +- .../com_mokosuitebackup/sql/updates/mysql/01.39.00.sql | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 source/packages/com_mokosuitebackup/sql/updates/mysql/01.39.00.sql diff --git a/source/packages/com_mokosuitebackup/sql/install.mysql.sql b/source/packages/com_mokosuitebackup/sql/install.mysql.sql index a87895c..3c6f7bc 100644 --- a/source/packages/com_mokosuitebackup/sql/install.mysql.sql +++ b/source/packages/com_mokosuitebackup/sql/install.mysql.sql @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebackup_profiles` ( `s3_path` VARCHAR(512) NOT NULL DEFAULT '/backups', `remote_keep_local` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep local copy after upload', `encryption_password` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'AES-256 archive encryption password (blank = no encryption)', - `include_mokorestore` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Include MokoRestore standalone restore script in archive', + `include_mokorestore` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT 'MokoRestore mode: 0=none, 1=wrapped, standalone', `notify_email` VARCHAR(512) NOT NULL DEFAULT '' COMMENT 'Comma-separated notification emails', `notify_user_groups` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Comma-separated Joomla user group IDs', `notify_on_success` TINYINT(1) NOT NULL DEFAULT 0, diff --git a/source/packages/com_mokosuitebackup/sql/updates/mysql/01.39.00.sql b/source/packages/com_mokosuitebackup/sql/updates/mysql/01.39.00.sql new file mode 100644 index 0000000..e7820b0 --- /dev/null +++ b/source/packages/com_mokosuitebackup/sql/updates/mysql/01.39.00.sql @@ -0,0 +1,5 @@ +-- MokoSuiteBackup 01.39.00 — Change include_mokorestore from TINYINT to VARCHAR +-- Needed to support 'standalone' value alongside 0/1 + +ALTER TABLE `#__mokosuitebackup_profiles` + MODIFY COLUMN `include_mokorestore` VARCHAR(20) NOT NULL DEFAULT '0';