From a0eb17b41f6983251d09a27ce8e822eb8bb9765a Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 5 Jan 2026 11:38:58 +0100 Subject: [PATCH 1/3] update_from_5.0: 5.0.4 DB Update --- .../from_5.0/update_from_5.0.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 530bb64912..9bb445ea5a 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -152,7 +152,32 @@ Run the provided SQL upgrade script to add the missing indexes to your database: ## v5.0.4 -No additional steps needed. +### Database update [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] + +On a platform first installed on v5.0.3, you need to execute the requests below. +If the platform comes from an earlier version, you don't need this (but if you run the requests anyway, you just obtain error messages). + +=== "MySQL" + + ``` sql + ALTER TABLE `ibexa_site_public_access` ADD COLUMN `tree_root_location_id` INT DEFAULT NULL; + ALTER TABLE `ibexa_site_public_access` ADD INDEX `ibexa_spa_trl_id` (`tree_root_location_id`); + + UPDATE ibexa_site_public_access + SET tree_root_location_id = CAST(JSON_UNQUOTE(JSON_EXTRACT(config, '$."ibexa.site_access.config.content.tree_root.location_id"')) AS SIGNED) + WHERE tree_root_location_id IS NULL AND JSON_EXTRACT(config, '$."ibexa.site_access.config.content.tree_root.location_id"') IS NOT NULL; + ``` + +=== "PostgreSQL" + + ``` sql + ALTER TABLE ibexa_site_public_access ADD COLUMN tree_root_location_id INT DEFAULT NULL; + CREATE INDEX "ibexa_spa_trl_id" ON "ibexa_site_public_access" ("tree_root_location_id"); + + UPDATE ibexa_site_public_access + SET tree_root_location_id = (config::jsonb ->> 'ibexa.site_access.config.content.tree_root.location_id')::integer + WHERE tree_root_location_id IS NULL AND config::jsonb ? 'ibexa.site_access.config.content.tree_root.location_id'; + ``` ## LTS Updates and additional packages From 118ab298c1310efd5d1a2d9a370e53de5e3cb82b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:54:47 +0100 Subject: [PATCH 2/3] update_from_5.0: 5.0.4 DB Update --- docs/update_and_migration/from_5.0/update_from_5.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 9bb445ea5a..6299a74184 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -154,8 +154,8 @@ Run the provided SQL upgrade script to add the missing indexes to your database: ### Database update [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] -On a platform first installed on v5.0.3, you need to execute the requests below. -If the platform comes from an earlier version, you don't need this (but if you run the requests anyway, you just obtain error messages). +From a platform first installed on v5.0.3 or updated precisely to v5.0.3, you need to execute the requests below. +If the platform comes from lower than v5.0.3 and is updated to higher than v5.0.3, you don't need this part (but if you run the requests anyway, you just obtain error messages, nothing being broken or lost). === "MySQL" From 257e694c176303756097ec35b43c9d76e45187f9 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Mon, 5 Jan 2026 16:02:53 +0100 Subject: [PATCH 3/3] update_from_5.0: 5.0.4 DB Update --- docs/update_and_migration/from_5.0/update_from_5.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/update_and_migration/from_5.0/update_from_5.0.md b/docs/update_and_migration/from_5.0/update_from_5.0.md index 6299a74184..0a1ec5eec2 100644 --- a/docs/update_and_migration/from_5.0/update_from_5.0.md +++ b/docs/update_and_migration/from_5.0/update_from_5.0.md @@ -155,7 +155,8 @@ Run the provided SQL upgrade script to add the missing indexes to your database: ### Database update [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]] From a platform first installed on v5.0.3 or updated precisely to v5.0.3, you need to execute the requests below. -If the platform comes from lower than v5.0.3 and is updated to higher than v5.0.3, you don't need this part (but if you run the requests anyway, you just obtain error messages, nothing being broken or lost). +If the platform comes from lower than v5.0.3 and is updated to higher than v5.0.3, you don't need this part +(but if you run the requests anyway, you only obtain error messages, nothing being broken or lost). === "MySQL"