From de227993de03b6cfa3e41effaca6f60baf14cf69 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Wed, 3 Sep 2025 20:05:59 +0200 Subject: [PATCH] Create the document URLs lock database record introduced in 16 but required in a 15 migration (#20064) * Create the document URLs lock database record introduced in 16 but required in a 15 migration. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Revert "Apply suggestions from code review" This reverts commit 0a4ee4878710edfe1c74b1d77ec9dc70bbf576fe. * Revert "Create the document URLs lock database record introduced in 16 but required in a 15 migration." This reverts commit 42ccaf985e79838e4cb799e83b46df7cd19ca429. * Moved lock record creation to premigration to ensure it's available when rebuilding URLs when migrating through 15 to latest. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: kjac --- .../Migrations/Upgrade/UmbracoPlan.cs | 2 +- .../Migrations/Upgrade/UmbracoPremigrationPlan.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs index 21294c9e76..39917cabe5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs @@ -122,7 +122,7 @@ public class UmbracoPlan : MigrationPlan // To 16.2.0 To("{741C22CF-5FB8-4343-BF79-B97A58C2CCBA}"); - To("{BE11D4D3-3A1F-4598-90D4-B548BD188C48}"); + To("{BE11D4D3-3A1F-4598-90D4-B548BD188C48}"); // Originally was V_16_2_0.AddDocumentUrlLock, now moved to a pre-migration. // To 16.3.0 To("{A917FCBC-C378-4A08-A36C-220C581A6581}"); diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPremigrationPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPremigrationPlan.cs index d9774aa1ea..380262c23a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPremigrationPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPremigrationPlan.cs @@ -67,5 +67,11 @@ public class UmbracoPremigrationPlan : MigrationPlan To("{B9133686-B758-404D-AF12-708AA80C7E44}"); To("{EEB1F012-B44D-4AB4-8756-F7FB547345B4}"); To("{0F49E1A4-AFD8-4673-A91B-F64E78C48174}"); + + // To 16.2.0 + // - This needs to be a pre-migration as it adds a lock to the process for rebuilding document URLs, which is + // called by a migration for 15. By using a pre-migration we ensure the lock record is in place when migrating + // through 15 versions to the latest. + To("{5ECCE7A7-2EFC-47A5-A081-FFD94D9F79AA}"); } }