From 6a6286888190e1efd3d265ee58658fcd6bfb089b Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 4 Jul 2026 19:01:50 -0500 Subject: [PATCH 1/2] fix(sql): purge stranded legacy remote-storage columns (MySQL 8 safe) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 02.52.25.sql used `DROP COLUMN IF EXISTS` (MariaDB-only), which errors on Oracle MySQL 8.x — so on MySQL 8 installs the 26 legacy remote_storage/ftp_*/ sftp_*/gdrive_*/s3_* columns were never dropped, yet Joomla recorded the schema as applied (confirmed on suite.dev: MySQL 8.0.41, all 26 columns still present, 0 profiles with legacy remote data). New 02.56.01 migration removes them portably: an INFORMATION_SCHEMA-gated prepared-statement ALTER that drops all 26 columns where present (plain DROP COLUMN, valid on MySQL 8 + MariaDB) and is a no-op where already gone (so it's safe on already-migrated installs too). Validated non-destructively against suite.dev (gate=1, ALTER PREPAREs cleanly). Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i --- .../sql/updates/mysql/02.56.01.sql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.01.sql diff --git a/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.01.sql b/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.01.sql new file mode 100644 index 0000000..04a5b62 --- /dev/null +++ b/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.01.sql @@ -0,0 +1,32 @@ +-- Purge legacy single-remote storage columns from installs where they are still present. +-- +-- Background: 02.52.25.sql originally used `DROP COLUMN IF EXISTS`, which is a +-- MariaDB-only extension and errors on Oracle MySQL 8.x. On MySQL 8 installs the +-- migration failed but Joomla still recorded the schema as applied, leaving all 26 +-- legacy remote_storage/ftp_*/sftp_*/gdrive_*/s3_* columns stranded on the profiles +-- table. This migration removes them portably. +-- +-- It must be safe on BOTH engines AND on installs where the columns are already gone +-- (MariaDB, or anyone who ran the corrected 02.52.25). Plain `DROP COLUMN` errors when +-- a column is absent, and `DROP COLUMN IF EXISTS` errors on MySQL 8 — so neither works +-- unconditionally. We gate the drop on INFORMATION_SCHEMA and build the ALTER via a +-- prepared statement, which runs on MySQL 8 and MariaDB alike. All 26 columns were +-- created and dropped together, so the presence of `remote_storage` gates the whole set. +-- When the columns are absent this is a no-op (`DO 0`). + +SET @moko_has_legacy_remote := ( + SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = '#__mokosuitebackup_profiles' + AND COLUMN_NAME = 'remote_storage' +); + +SET @moko_drop_legacy_remote := IF(@moko_has_legacy_remote > 0, + 'ALTER TABLE `#__mokosuitebackup_profiles` DROP COLUMN `remote_storage`, DROP COLUMN `ftp_host`, DROP COLUMN `ftp_port`, DROP COLUMN `ftp_username`, DROP COLUMN `ftp_password`, DROP COLUMN `ftp_path`, DROP COLUMN `ftp_passive`, DROP COLUMN `ftp_ssl`, DROP COLUMN `sftp_host`, DROP COLUMN `sftp_port`, DROP COLUMN `sftp_username`, DROP COLUMN `sftp_auth_type`, DROP COLUMN `sftp_password`, DROP COLUMN `sftp_key_data`, DROP COLUMN `sftp_passphrase`, DROP COLUMN `sftp_path`, DROP COLUMN `gdrive_client_id`, DROP COLUMN `gdrive_client_secret`, DROP COLUMN `gdrive_refresh_token`, DROP COLUMN `gdrive_folder_id`, DROP COLUMN `s3_endpoint`, DROP COLUMN `s3_region`, DROP COLUMN `s3_access_key`, DROP COLUMN `s3_secret_key`, DROP COLUMN `s3_bucket`, DROP COLUMN `s3_path`', + 'DO 0' +); + +PREPARE moko_stmt FROM @moko_drop_legacy_remote; +EXECUTE moko_stmt; +DEALLOCATE PREPARE moko_stmt; -- 2.52.0 From c7a57116a7ab66a07fb81789a25f3d4090a4537e Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 5 Jul 2026 00:02:14 +0000 Subject: [PATCH 2/2] chore(version): pre-release bump to 02.56.05-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- SECURITY.md | 2 +- source/packages/MokoSuiteClient | 2 +- source/packages/com_mokosuitebackup/mokosuitebackup.xml | 2 +- .../packages/com_mokosuitebackup/sql/updates/mysql/02.56.05.sql | 1 + .../mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml | 2 +- .../packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml | 2 +- source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml | 2 +- source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml | 2 +- .../packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml | 2 +- source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml | 2 +- source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml | 2 +- .../plg_webservices_mokosuitebackup/mokosuitebackup.xml | 2 +- source/pkg_mokosuitebackup.xml | 2 +- 14 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.05.sql diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 11958bd..da90b37 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 01.00.00 +# VERSION: 02.56.05 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/SECURITY.md b/SECURITY.md index f643871..24afe57 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: Template-Joomla INGROUP: Template-Joomla.Documentation REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla PATH: /SECURITY.md -VERSION: 02.56.00 +VERSION: 02.56.05 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/source/packages/MokoSuiteClient b/source/packages/MokoSuiteClient index 8bfae85..464b5da 160000 --- a/source/packages/MokoSuiteClient +++ b/source/packages/MokoSuiteClient @@ -1 +1 @@ -Subproject commit 8bfae85d74b44ea528d25fd33f1d8afa02d6077a +Subproject commit 464b5da9293e3560718b7b5fe3cc8267c2ca9ae5 diff --git a/source/packages/com_mokosuitebackup/mokosuitebackup.xml b/source/packages/com_mokosuitebackup/mokosuitebackup.xml index 4993358..66bfa08 100644 --- a/source/packages/com_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/com_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Component - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.05.sql b/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.05.sql new file mode 100644 index 0000000..8a865d6 --- /dev/null +++ b/source/packages/com_mokosuitebackup/sql/updates/mysql/02.56.05.sql @@ -0,0 +1 @@ +/* 02.56.05 — no schema changes */ diff --git a/source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml b/source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml index f223415..8ee0b6e 100644 --- a/source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml +++ b/source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml @@ -8,7 +8,7 @@ --> Module - MokoSuiteBackup - cPanel - 02.56.00 + 02.56.05 2026-06-23 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml index aefa7ea..8fec08a 100644 --- a/source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Action Log - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-04 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml index 9a79926..6a59b01 100644 --- a/source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Console - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-04 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml index 337eeab..fe4b04a 100644 --- a/source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Content - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-04 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml index 40228fd..b8d562b 100644 --- a/source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml @@ -1,7 +1,7 @@ Quick Icon - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml index 4809ee2..1ec0322 100644 --- a/source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> System - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml index 2b1173c..0bc36ff 100644 --- a/source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Task - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech diff --git a/source/packages/plg_webservices_mokosuitebackup/mokosuitebackup.xml b/source/packages/plg_webservices_mokosuitebackup/mokosuitebackup.xml index 2bda69e..42aade0 100644 --- a/source/packages/plg_webservices_mokosuitebackup/mokosuitebackup.xml +++ b/source/packages/plg_webservices_mokosuitebackup/mokosuitebackup.xml @@ -7,7 +7,7 @@ --> Web Services - MokoSuiteBackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech diff --git a/source/pkg_mokosuitebackup.xml b/source/pkg_mokosuitebackup.xml index f6ce575..25f1e07 100644 --- a/source/pkg_mokosuitebackup.xml +++ b/source/pkg_mokosuitebackup.xml @@ -8,7 +8,7 @@ Package - MokoSuiteBackup mokosuitebackup - 02.56.00 + 02.56.05 2026-06-02 Moko Consulting hello@mokoconsulting.tech -- 2.52.0