From 83c0a3249484b520e5c72477251f16189e4e5832 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 9 May 2026 12:42:29 +1200 Subject: [PATCH] fix(advisor): make reports.target a TEXT column target stores free-form URLs or resource IDs. URLs in the wild can exceed the prior 2048-char cap, so switch the column to VAR_TEXT (65535). The _key_project_target index already declares an explicit 700-char prefix length, so indexing still works on both MariaDB and MongoDB. Bump APP_CACHE_BUSTER for the schema change. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/config/collections/platform.php | 5 +++-- app/init/constants.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index a3758a52bf..56677b9810 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -2032,10 +2032,11 @@ $platformCollections = [ ], [ // Free-form target identifier (URL for lighthouse, resource ID for db). + // Indexed by `_key_project_target` with an explicit prefix length. '$id' => ID::custom('target'), - 'type' => Database::VAR_STRING, + 'type' => Database::VAR_TEXT, 'format' => '', - 'size' => 2048, + 'size' => 65535, 'signed' => true, 'required' => true, 'default' => null, diff --git a/app/init/constants.php b/app/init/constants.php index d4f812115e..57e355992c 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -50,7 +50,7 @@ const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours const APP_RESOURCE_TOKEN_ACCESS = 24 * 60 * 60; // 24 hours const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours -const APP_CACHE_BUSTER = 4326; +const APP_CACHE_BUSTER = 4327; const APP_VERSION_STABLE = '1.9.3'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';