Skip to content

Commit a879c75

Browse files
authored
Merge pull request #6662 from kjac/v15/feature/migrate-content-for-V15
Added docs for V15 content migration
2 parents b787d73 + 56754eb commit a879c75

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

15/umbraco-cms/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [Upgrade your project](fundamentals/setup/upgrading/README.md)
2727
* [Version Specific Upgrades](fundamentals/setup/upgrading/version-specific/README.md)
2828
* [Upgrade from Umbraco 8 to the latest version](fundamentals/setup/upgrading/version-specific/upgrade-from-8-to-latest.md)
29+
* [Migrate content to Umbraco 15](fundamentals/setup/upgrading/version-specific/migrate-content-to-umbraco-15.md)
2930
* [Migrate content to Umbraco 8](fundamentals/setup/upgrading/version-specific/migrate-content-to-umbraco-8.md)
3031
* [Minor upgrades for Umbraco 8](fundamentals/setup/upgrading/version-specific/minor-upgrades-for-umbraco-8.md)
3132
* [Upgrade to Umbraco 7](fundamentals/setup/upgrading/version-specific/upgrade-to-umbraco-7.md)

15/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,14 @@ Macros and partial views macros have been removed in Umbraco 14. We recommend us
10621062

10631063
For more information on what has changed in Umbraco 14 read the [Breaking changes in Umbraco 14](./#umbraco-14).
10641064

1065+
**Block Editor data format has changes**
1066+
1067+
In Umbraco 15, the internal data format for [Block Editors](../../../../fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/README.md) has changed. This causes a content migration to run when upgrading.
1068+
1069+
This content migration can take a while to complete on a large site, causing it to be unresponsive for the duration. To speed up the migration, it is advised to [clean up old content versions](../../../../fundamentals/data/content-version-cleanup.md) before upgrading.
1070+
1071+
While we don't recommend this, it might be possible for you to skip the content migration. More details can be found in the [Migrate content to Umbraco 15](migrate-content-to-umbraco-15.md) article.
1072+
10651073
</details>
10661074

10671075
<details>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
description: >-
3+
This article will help you migrate content to Umbraco 15, and outline options to skip this content migration
4+
---
5+
6+
# Migrate content to Umbraco 15
7+
8+
Umbraco 15 changes the internal data format of all [Block Editors](../../../../fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/README.md).
9+
10+
If you maintain a large Umbraco site with extensive Block Editor usage, the upgrade to Umbraco 15+ might require a long-running content migration. For the duration of the migration, your site will be unresponsive and unable to serve requests.
11+
12+
You can track the progress of the migration in the logs.
13+
14+
It is advised to [clean up old content versions](../../../../fundamentals/data/content-version-cleanup.md) before upgrading. This will make the migration run faster.
15+
16+
## Opting out of the content migration
17+
18+
It is strongly recommended to let the migration run as part of the upgrade. However, if you are upgrading to Umbraco versions 15, 16, or 17, you _can_ opt out of the migration. Your site will continue to work, albeit with a certain degree of performance degradation.
19+
20+
{% hint style="warning" %}
21+
Blocks in Rich Text Editors might not work as expected if you opt out of the content migration.
22+
{% endhint %}
23+
24+
You can opt out of migrating each Block Editor type individually. To opt-out, add an `IComposer` implementation to configure the `ConvertBlockEditorPropertiesOptions` before initiating the upgrade process:
25+
26+
{% code title="DisableBlockEditorMigrationComposer.cs" %}
27+
28+
```csharp
29+
using Umbraco.Cms.Core.Composing;
30+
using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0;
31+
32+
namespace UmbracoDocs.Samples;
33+
34+
public class DisableBlockEditorMigrationComposer : IComposer
35+
{
36+
[Obsolete]
37+
public void Compose(IUmbracoBuilder builder)
38+
=> builder.Services.Configure<ConvertBlockEditorPropertiesOptions>(options =>
39+
{
40+
// setting this to true will skip the migration of all Block List properties
41+
options.SkipBlockListEditors = false;
42+
43+
// setting this to true will skip the migration of all Block Grid properties
44+
options.SkipBlockGridEditors = false;
45+
46+
// setting this to true will skip the migration of all Rich Text Editor properties
47+
options.SkipRichTextEditors = false;
48+
});
49+
}
50+
```
51+
52+
{% endcode %}
53+
54+
Subsequently, you are responsible for performing the content migration yourself. This _must_ be done before upgrading past Umbraco 17.
55+
56+
Custom code is required to perform the content migration. You can find inspiration in the core migrations:
57+
58+
- [`ConvertBlockListEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockListEditorProperties.cs) for Block List properties.
59+
- [`ConvertBlockGridEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockGridEditorProperties.cs) for Block Grid properties.
60+
- [`ConvertRichTextEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertRichTextEditorProperties.cs) for Rich Text Editor properties.
61+
62+
{% hint style="warning" %}
63+
This custom code should not run while editors are working in the Umbraco backoffice.
64+
65+
The site may require a restart once the content migration is complete.
66+
{% endhint %}

0 commit comments

Comments
 (0)