Skip to content

Commit 208f888

Browse files
authored
Added description of "allow_no_delete" in migrations (#2853)
1 parent 95f999d commit 208f888

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-
2+
type: content
3+
mode: delete
4+
match:
5+
field: content_remote_id
6+
value: __REMOTE_ID__
7+
only_visible_content: true # Optional, default: true. If set to true, only visible content will be deleted.
8+
allow_no_delete: false # Optional, default: false. If set to true, the migration will not fail if no content is found using the specified criteria.

docs/content_management/data_migration/importing_data.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@ In this case you assign the `parent_folder_location_id` reference name to the lo
242242
[[= include_file('code_samples/data_migration/examples/create_parent_and_child_content.yaml') =]]
243243
```
244244

245+
Use the `delete` mode to delete content items:
246+
247+
``` yaml
248+
[[= include_file('code_samples/data_migration/examples/delete_content.yaml') =]]
249+
```
250+
245251
### Images
246252

247253
The following example shows how to migrate an `example-image.png` located in `public/var/site/storage/images/3/8/3/0/383-1-eng-GB` without manually placing it in the appropriate path.

0 commit comments

Comments
 (0)