Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from v4.4.x to v4.5 #1975

Merged
merged 7 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions docs/update_and_migration/from_4.4/update_from_4.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
--
description: Update your installation to the latest v4.5 version from v4.4.x.
---

# Update from v4.4.x to v4.5

This update procedure applies if you are using a v4.4 installation.

## Update from v4.4.x to v4.4.latest

Before you update to v4.5, you need to go through the following steps to update to the latest maintenance release of v4.4 (v[[= latest_tag_4_4 =]]).

### Update the application to v4.4.latest

Run:

=== "[[= product_name_content =]]"

``` bash
composer require ibexa/content:[[= latest_tag_4_4 =]] --with-all-dependencies --no-scripts
```
=== "[[= product_name_exp =]]"

``` bash
composer require ibexa/experience:[[= latest_tag_4_4 =]] --with-all-dependencies --no-scripts
```
=== "[[= product_name_com =]]"

``` bash
composer require ibexa/commerce:[[= latest_tag_4_4 =]] --with-all-dependencies --no-scripts
```

## Update from v4.4.latest to v4.5

When you have the latest version of v4.4, you can update to v4.5.

### Update the application

First, run:

=== "[[= product_name_content =]]"

``` bash
composer require ibexa/content:[[= latest_tag_4_5 =]] --with-all-dependencies --no-scripts
composer recipes:install ibexa/content --force -v
```
=== "[[= product_name_exp =]]"

``` bash
composer require ibexa/experience:[[= latest_tag_4_5 =]] --with-all-dependencies --no-scripts
composer recipes:install ibexa/experience --force -v
```
=== "[[= product_name_com =]]"

``` bash
composer require ibexa/commerce:[[= latest_tag_4_5 =]] --with-all-dependencies --no-scripts
composer recipes:install ibexa/commerce --force -v
```

The `recipes:install` command installs new YAML configuration files.
Review the old YAML files and move your custom configuration to the relevant new files.

### Update the database

Next, update the database if you are using Ibexa Commerce.
Ibexa Content and Ibexa Experience do not require the database update.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true, there's a script to execute:
https://github.com/ibexa/installer/blob/main/upgrade/db/postgresql/ibexa.4.4.latest-to-4.5.0.sql

for Content and Experience (and a new table for OSS)

BTW for some reason it doesn't follow our naming convention, we should rename it to match it (see all the names here: https://github.com/ibexa/installer/tree/main/upgrade/db/postgresql)


[[% include 'snippets/update/db/db_backup_warning.md' %]]

Apply the following database update scripts:

=== "MySQL"

``` bash
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/commerce/ibexa-4.4.latest-to-4.5.0.sql
```

=== "PostgreSQL"

``` bash
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/commerce/ibexa-4.4.latest-to-4.5.0.sql
```

#### Ibexa Open Source

If you have no access to Ibexa DXP's `ibexa/installer` package, database upgrade is not necessary.


## Finish code update

Finish the code update by running:

```bash
composer run post-install-cmd
```

## Run data migration

### Customer Portal

If you are using Ibexa Experience or Ibexa Commerce,
you can now run data migration required by the Customer Portal and Commerce features to finish the update process:

- Customer Portal:

```bash
php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/customer_portal.yaml --name=2023_03_06_13_00_customer_portal.yaml
php bin/console ibexa:migration:migrate --file=2023_03_06_13_00_customer_portal.yaml
```

- Corporate account — this migration allows all company members to shop in the frontend shop. If you have implemented business logic that depends on keeping company members out of the frontend shop, you can skip it:

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong here, because the files mentioned below ((2023_04_27_10_30_corporate_account, 2023_04_27_11_20_storefront_user_role_update) do not exist in the Storefront package
https://github.com/ibexa/storefront/tree/main/src/bundle/Resources/migrations

Copy link
Contributor Author

@MagdalenaZuba MagdalenaZuba May 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, tje PR is still waiting for merge, I was sure it will be added to rc: https://github.com/ibexa/storefront/pull/100

php bin/console ibexa:migrations:import vendor/ibexa/storefront/src/bundle/Resources/migrations/2023_04_27_10_30_corporate_account.yaml --name=2023_04_27_10_30_corporate_account.yaml
php bin/console ibexa:migration:migrate --file=2023_04_27_10_30_corporate_account.yaml
```

- Storefront user update:

```bash
php bin/console ibexa:migrations:import vendor/ibexa/storefront/src/bundle/Resources/migrations/2023_04_27_11_20_storefront_user_role_update.yaml --name=2023_04_27_11_20_storefront_user_role_update.yaml
php bin/console ibexa:migration:migrate --file=2023_04_27_11_20_storefront_user_role_update.yaml
```
2 changes: 1 addition & 1 deletion docs/update_and_migration/update_ibexa_dxp.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ To update [[= product_name =]] to a newer version, select the version you are cu

=== "I am using v4.0"

If you already have a v4.0 installation, [update to the latest v4.4 version](from_4.3/update_from_4.3.md).
If you already have a v4.0 installation, [update to the latest v4.5 version](from_4.4/update_from_4.4.md).
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ nav:
- Update to v4.4: update_and_migration/from_4.3/update_from_4.3.md
- Use new Commerce packages: update_and_migration/from_4.3/update_from_4.3_new_commerce.md
- Keep old Commerce packages: update_and_migration/from_4.3/update_from_4.3_old_commerce.md
- Update from v4.4:
- Update to v4.5: update_and_migration/from_4.4/update_from_4.4.md
- Migrate to Ibexa DXP:
- Migrate from eZ Publish Platform: update_and_migration/migrate_to_ibexa_dxp/migrating_from_ez_publish_platform.md
- Migrate from eZ Publish: update_and_migration/migrate_to_ibexa_dxp/migrating_from_ez_publish.md
Expand Down