Skip to content

Commit df1e44e

Browse files
committed
Added documentation for Location swap migration (#2440)
1 parent e3df900 commit df1e44e

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-
2+
type: location
3+
mode: swap
4+
match1:
5+
field: location_remote_id
6+
value: f3e90596361e31d496d4026eb624c983
7+
match2:
8+
field: location_id
9+
value: 5

docs/guide/data_migration/exporting_and_importing_data.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,19 @@ If you do not provide the `--mode` option, the command asks you to select the mo
170170

171171
The following data migration steps are available:
172172

173-
| `type` | `create` | `update` | `delete` |
174-
|----------------------|:--------:|:--------:|:--------:|
175-
| `content_type` | ✔ | ✔ | |
176-
| `content_type_group` | ✔ | ✔ | |
177-
| `content` | ✔ | ✔ | ✔ |
178-
| `language` | ✔ | | |
179-
| `location` | | ✔ | |
180-
| `object_state` | ✔ | | |
181-
| `object_state_group` | ✔ | | |
182-
| `role` | ✔ | ✔ | ✔ |
183-
| `section` | ✔ | ✔ | |
184-
| `user` | ✔ | ✔ | |
185-
| `user_group` | ✔ | | ✔ |
173+
| `type` | `create` | `update` | `delete` | `swap` |
174+
|----------------------|:--------:|:--------:|:--------:|:--------:|
175+
| `content_type` | ✔ | ✔ | | |
176+
| `content_type_group` | ✔ | ✔ | | |
177+
| `content` | ✔ | ✔ | ✔ | |
178+
| `language` | ✔ | | | |
179+
| `location` | | ✔ | | ✔ |
180+
| `object_state` | ✔ | | | |
181+
| `object_state_group` | ✔ | | | |
182+
| `role` | ✔ | ✔ | ✔ | |
183+
| `section` | ✔ | ✔ | | |
184+
| `user` | ✔ | ✔ | | |
185+
| `user_group` | ✔ | | ✔ | |
186186

187187
## siteaccess
188188

@@ -364,6 +364,16 @@ The required metadata keys are: `identifier`, `mainTranslation`, `contentTypeGro
364364
[[= include_file('code_samples/data_migration/examples/create_blog_post_ct.yaml') =]]
365365
```
366366

367+
### Locations
368+
369+
The following example shows how to swap content items assigned to given locations.
370+
371+
``` yaml
372+
[[= include_file('code_samples/data_migration/examples/swap_location.yaml') =]]
373+
```
374+
375+
376+
367377
### Images
368378

369379
The following example shows how to migrate an `example-image.png` located in

0 commit comments

Comments
 (0)