From e746afd835d1f5014fa1066b73f63605ff9ec381 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Mon, 29 Jun 2026 15:16:25 +0000 Subject: [PATCH] fix: add missing SQL migration for license_cache table and sync schema version The mokosuite_license_cache table was added to install.mysql.sql but never had a corresponding update file. Existing installs (upgrading from pre-02.48.20) never received this table. Additionally, no SQL update files existed between 02.48.20 and 02.52.00, causing Joomla to report a database schema mismatch (manifest says 02.52.00 but #__schemas is stuck at 02.48.20). --- .../admin/sql/updates/mysql/02.52.00.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 source/packages/com_mokosuiteclient/admin/sql/updates/mysql/02.52.00.sql diff --git a/source/packages/com_mokosuiteclient/admin/sql/updates/mysql/02.52.00.sql b/source/packages/com_mokosuiteclient/admin/sql/updates/mysql/02.52.00.sql new file mode 100644 index 00000000..f343750d --- /dev/null +++ b/source/packages/com_mokosuiteclient/admin/sql/updates/mysql/02.52.00.sql @@ -0,0 +1,11 @@ +-- 02.52.00 — Create license cache table (missing from prior migrations) +-- This table was in install.mysql.sql but never had an update file, +-- so existing installs never received it. + +CREATE TABLE IF NOT EXISTS `#__mokosuite_license_cache` ( + `dlid_hash` CHAR(64) NOT NULL COMMENT 'SHA-256 of DLID (never store raw DLID)', + `response_data` TEXT NOT NULL COMMENT 'JSON validation response from MokoGitea', + `checked_at` DATETIME NOT NULL, + PRIMARY KEY (`dlid_hash`), + KEY `idx_checked` (`checked_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;