From 7e01230340bf911d3d4f0e36b42c8a4af307d6b1 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Wed, 13 Dec 2023 16:14:14 +0100 Subject: [PATCH 1/4] exporting_data.md: Add caution about used SiteAccess --- docs/content_management/data_migration/exporting_data.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/content_management/data_migration/exporting_data.md b/docs/content_management/data_migration/exporting_data.md index 24f348be0c..af9bcc0c37 100644 --- a/docs/content_management/data_migration/exporting_data.md +++ b/docs/content_management/data_migration/exporting_data.md @@ -14,7 +14,7 @@ or in [a custom folder that you configure](managing_migrations.md#migration-fold You can later use this file to import the data. ``` bash -php bin/console ibexa:migrations:generate --type=content --mode=create +php bin/console ibexa:migrations:generate --type=content --mode=create --siteaccess=admin ``` 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 Migration command can be executed with database rollback at the end with the `--dry-run` option. +!!! caution + + `--siteaccess` option usage can be relevant on multi-languages repository. + You must export with the SiteAccess supporting all the languages, or migration skips translations in non-supported languages. + It is recommended to use the SiteAccess of the Back Office of the targeted repository. + ## type The mandatory `--type` option defines the type of Repository data to export. From 4d29d10cedc29f14d545e9728026f8a07d02ee5f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis Date: Wed, 13 Dec 2023 16:17:33 +0100 Subject: [PATCH 2/4] importing_data.md: About used SiteAccess --- docs/content_management/data_migration/importing_data.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/content_management/data_migration/importing_data.md b/docs/content_management/data_migration/importing_data.md index 94a9beeba1..6c766273c7 100644 --- a/docs/content_management/data_migration/importing_data.md +++ b/docs/content_management/data_migration/importing_data.md @@ -15,13 +15,18 @@ and specify the file name within this folder as parameter. If you don't specify the file, all files within this directory are used. ``` bash -php bin/console ibexa:migrations:migrate --file=my_data_export.yaml +php bin/console ibexa:migrations:migrate --file=my_data_export.yaml --siteaccess=admin ``` Migrations store execution metadata in the `ibexa_migrations` database table. This allows incremental upgrades: the `ibexa:migrations:migrate` command ignores files that it had previously executed. +Notice the `--siteaccess` option usage. +This can be important, especially when several languages are used. +You must import with the SiteAccess supporting all the languages, or migration skips translations in non-supported languages. +It's recommended to use the SiteAccess of the Back Office of the targeted repository. + ## Migration step A data migration step is a single operation in data migration process From 1350a971771c98ccfc2295ea3fa1edf1b8986a34 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:46:18 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Magdalena Dziadosz <35031941+MagdalenaZuba@users.noreply.github.com> --- docs/content_management/data_migration/exporting_data.md | 6 +++--- docs/content_management/data_migration/importing_data.md | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/content_management/data_migration/exporting_data.md b/docs/content_management/data_migration/exporting_data.md index af9bcc0c37..3b7165f788 100644 --- a/docs/content_management/data_migration/exporting_data.md +++ b/docs/content_management/data_migration/exporting_data.md @@ -136,9 +136,9 @@ Note that you should test your migrations. See [Importing data](importing_data.m !!! caution - `--siteaccess` option usage can be relevant on multi-languages repository. - You must export with the SiteAccess supporting all the languages, or migration skips translations in non-supported languages. - It is recommended to use the SiteAccess of the Back Office of the targeted repository. + The `--siteaccess` option usage can be relevant for a multi-language repository. + You must export with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. + It is recommended to use the SiteAccess from the Back Office of the targeted repository. ## type diff --git a/docs/content_management/data_migration/importing_data.md b/docs/content_management/data_migration/importing_data.md index 6c766273c7..6848d64422 100644 --- a/docs/content_management/data_migration/importing_data.md +++ b/docs/content_management/data_migration/importing_data.md @@ -22,10 +22,9 @@ Migrations store execution metadata in the `ibexa_migrations` database table. This allows incremental upgrades: the `ibexa:migrations:migrate` command ignores files that it had previously executed. -Notice the `--siteaccess` option usage. -This can be important, especially when several languages are used. -You must import with the SiteAccess supporting all the languages, or migration skips translations in non-supported languages. -It's recommended to use the SiteAccess of the Back Office of the targeted repository. +Notice that `--siteaccess` option usage is important when several languages are used. +You must import with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. +It's recommended to use the SiteAccess from the Back Office of the targeted repository. ## Migration step From 002970bf90f4fd69272dc48fa29a4fbe92c32b3f Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:21:38 +0100 Subject: [PATCH 4/4] exporting_data.md: Fix Ibexa.EOLWhitespace --- docs/content_management/data_migration/exporting_data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content_management/data_migration/exporting_data.md b/docs/content_management/data_migration/exporting_data.md index 3b7165f788..6bf9fd024d 100644 --- a/docs/content_management/data_migration/exporting_data.md +++ b/docs/content_management/data_migration/exporting_data.md @@ -137,7 +137,7 @@ Note that you should test your migrations. See [Importing data](importing_data.m !!! caution The `--siteaccess` option usage can be relevant for a multi-language repository. - You must export with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. + You must export with a SiteAccess that supports all languages, or the migration skips translations in non-supported languages. It is recommended to use the SiteAccess from the Back Office of the targeted repository. ## type