Skip to content

Latest commit

 

History

History
210 lines (152 loc) · 7.02 KB

File metadata and controls

210 lines (152 loc) · 7.02 KB
description
Update your installation to the v4.2.latest version from an v4.1 version.

Update from v4.1.x to v4.2

This update procedure applies if you're using a v4.1 installation.

[[% include 'snippets/update/temporary_v4_conflicts.md' %]]

Update from v4.1.x to v4.1.latest

Before you update to v4.2, you need to go through the following steps to update to the latest maintenance release of v4.1 (v[[= latest_tag_4_1 =]]).

Update the application

Run:

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

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

=== "[[= product_name_exp =]]"

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

=== "[[= product_name_com =]]"

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

VCL configuration for Fastly

The Fastly .vcl configuration files have changed. Follow the upgrade steps below to update them:

  1. Locate the vendor/ibexa/fastly/fastly/ez_main.vcl file and update your VCL file with the recent changes.
  2. Do the same with vendor/ibexa/fastly/fastly/ez_user_hash.vcl.
  3. Upload a new snippet_re_enable_shielding.vcl snippet file, based on vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl.

Once the VCL configuration has been updated, you may enable Fastly Shielding if you prefer.

Update from v4.1.latest to v4.2

When you have the latest version of v4.1, you can update to v4.2.

Update the application

First, run:

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

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

=== "[[= product_name_exp =]]"

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

=== "[[= product_name_com =]]"

``` bash
composer require ibexa/commerce:[[= latest_tag_4_2 =]] --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.

Run data migration

Next, run data migration required by Product Categories:

php bin/console ibexa:migrations:import vendor/ibexa/product-catalog/src/bundle/Resources/migrations/2022_06_23_09_39_product_categories.yaml --name=013_product_categories.yaml

If you're using [[= product_name_exp =]] or [[= product_name_com =]], run data migration required by the Customer portal feature:

php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/corporate_account.yaml --name=001_corporate_account.yaml

If you're using [[= product_name_com =]], additionally run:

php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/corporate_account_commerce.yaml --name=002_corporate_account_commerce.yaml

Run php bin/console ibexa:migrations:migrate -v --dry-run to ensure that all migrations are ready to be performed. If the dry run is successful, run:

php bin/console ibexa:migrations:migrate

Update the database

Next, update the database.

[[% 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/ibexa-4.1.latest-to-4.2.0.sql
mysql -u <username> -p <password> <database_name> < vendor/ibexa/installer/upgrade/db/mysql/ibexa-4.2.2-to-4.2.3.sql
```

=== "PostgreSQL"

``` bash
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.1.latest-to-4.2.0.sql
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.2.2-to-4.2.3.sql
```

Ibexa Open Source

If you have no access to [[= product_name =]]'s ibexa/installer package, apply the following database upgrade script:

=== "MySQL"

CREATE TABLE IF NOT EXISTS ibexa_user_invitations
(
    id               int auto_increment primary key,
    email            varchar(255) not null,
    site_access_name varchar(255) not null,
    hash             varchar(255) not null,
    creation_date    int          not null,
    used             tinyint(1)   null,
    constraint ibexa_user_invitations_email_uindex
    unique (email(191)),
    constraint ibexa_user_invitations_hash_uindex
    unique (hash(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS ibexa_user_invitations_assignments
(
    id               int auto_increment primary key,
    invitation_id    int          not null,
    user_group_id    int          null,
    role_id          int          null,
    limitation_type  varchar(255) null,
    limitation_value varchar(255) null,
    constraint ibexa_user_invitations_assignments_ibexa_user_invitations_id_fk
    foreign key (invitation_id) references ibexa_user_invitations (id)
    on update cascade on delete cascade
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

=== "PostgreSQL"

CREATE TABLE IF NOT EXISTS ibexa_user_invitations
(
    id               SERIAL PRIMARY KEY,
    email            VARCHAR(255) NOT NULL,
    site_access_name VARCHAR(255) NOT NULL,
    hash             VARCHAR(255) NOT NULL,
    creation_date    INTEGER      NOT NULL,
    used             BOOLEAN      DEFAULT false NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS ibexa_user_invitations_email_uindex
    ON ibexa_user_invitations (email);

CREATE UNIQUE INDEX IF NOT EXISTS ibexa_user_invitations_hash_uindex
    ON ibexa_user_invitations (hash);

CREATE TABLE IF NOT EXISTS ibexa_user_invitations_assignments
(
    id               SERIAL PRIMARY KEY,
    invitation_id    INTEGER      NOT NULL,
    user_group_id    INTEGER      NULL,
    role_id          INTEGER      NULL,
    limitation_type  VARCHAR(255) NULL,
    limitation_value VARCHAR(255) NULL,
    CONSTRAINT ibexa_content_customer_group_attribute_fk
    FOREIGN KEY (invitation_id) REFERENCES ibexa_user_invitations (id)
    ON UPDATE CASCADE ON DELETE CASCADE
);

Ensure password safety

Following Security advisory: IBEXA-SA-2022-009, unless you can verify based on your log files that the vulnerability has not been exploited, you should revoke passwords for all affected users.

Remove node_modules and yarn.lock

Next, remove node_modules and yarn.lock before running composer run post-update-cmd, otherwise you can encounter errors during compiling.

rm -Rf node_modules
rm -Rf yarn.lock