Skip to content

Commit 6ea0043

Browse files
Specify SiteAccess for translations data migrations (#2247)
--------- Co-authored-by: Adrien Dupuis <[email protected]> Co-authored-by: Magdalena Dziadosz <[email protected]>
1 parent d2a2bb8 commit 6ea0043

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/content_management/data_migration/exporting_data.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ or in [a custom folder that you configure](managing_migrations.md#migration-fold
1414
You can later use this file to import the data.
1515

1616
``` bash
17-
php bin/console ibexa:migrations:generate --type=content --mode=create
17+
php bin/console ibexa:migrations:generate --type=content --mode=create --siteaccess=admin
1818
```
1919

2020
This generates a file containing all Content items.
@@ -134,6 +134,12 @@ Note that you should test your migrations. See [Importing data](importing_data.m
134134

135135
Migration command can be executed with database rollback at the end with the `--dry-run` option.
136136

137+
!!! caution
138+
139+
The `--siteaccess` option usage can be relevant for a multi-language repository.
140+
You must export with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages.
141+
It is recommended to use the SiteAccess from the Back Office of the targeted repository.
142+
137143
## type
138144

139145
The mandatory `--type` option defines the type of Repository data to export.

docs/content_management/data_migration/importing_data.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ and specify the file name within this folder as parameter.
1515
If you don't specify the file, all files within this directory are used.
1616

1717
``` bash
18-
php bin/console ibexa:migrations:migrate --file=my_data_export.yaml
18+
php bin/console ibexa:migrations:migrate --file=my_data_export.yaml --siteaccess=admin
1919
```
2020

2121
Migrations store execution metadata in the `ibexa_migrations` database table.
2222
This allows incremental upgrades:
2323
the `ibexa:migrations:migrate` command ignores files that it had previously executed.
2424

25+
Notice that `--siteaccess` option usage is important when several languages are used.
26+
You must import with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages.
27+
It's recommended to use the SiteAccess from the Back Office of the targeted repository.
28+
2529
## Migration step
2630

2731
A data migration step is a single operation in data migration process

0 commit comments

Comments
 (0)