-
Notifications
You must be signed in to change notification settings - Fork 85
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0baef01
Update from v4.4.x to v4.5
MagdalenaZuba 924c6c1
Update from v4.4.x to v4.5
MagdalenaZuba 92ebf26
Updates
MagdalenaZuba 62af4e3
Corrections after review
MagdalenaZuba 6dda9a6
Corrections after review
MagdalenaZuba 27bd56a
Corporate access role update - migration
MagdalenaZuba 94b8058
Ibexa Open Source database update
MagdalenaZuba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
-- | ||
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: | ||
|
||
[[% 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.4.latest-to-4.5.0.sql | ||
|
||
``` | ||
|
||
=== "PostgreSQL" | ||
|
||
``` bash | ||
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.4.latest-to-4.5.0.sql | ||
``` | ||
|
||
#### Ibexa Open Source | ||
|
||
If you have no access to Ibexa DXP's `ibexa/installer` package, apply the following database update: | ||
|
||
=== "MySQL" | ||
|
||
``` sql | ||
CREATE TABLE ibexa_token_type | ||
( | ||
id int(11) NOT NULL AUTO_INCREMENT, | ||
identifier varchar(64) NOT NULL, | ||
PRIMARY KEY (id), | ||
UNIQUE KEY ibexa_token_type_unique (identifier) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; | ||
|
||
CREATE TABLE ibexa_token | ||
( | ||
id int(11) NOT NULL AUTO_INCREMENT, | ||
type_id int(11) NOT NULL, | ||
token varchar(255) NOT NULL, | ||
identifier varchar(128) DEFAULT NULL, | ||
created int(11) NOT NULL DEFAULT 0, | ||
expires int(11) NOT NULL DEFAULT 0, | ||
PRIMARY KEY (id), | ||
UNIQUE KEY ibexa_token_unique (token,identifier,type_id), | ||
CONSTRAINT ibexa_token_type_id_fk | ||
FOREIGN KEY (type_id) REFERENCES ibexa_token_type (id) | ||
ON DELETE CASCADE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; | ||
``` | ||
|
||
=== "PostgreSQL" | ||
|
||
``` sql | ||
CREATE TABLE ibexa_token_type | ||
( | ||
id serial PRIMARY KEY, | ||
identifier varchar(64) NOT NULL | ||
); | ||
|
||
CREATE TABLE ibexa_token | ||
( | ||
id serial PRIMARY KEY, | ||
type_id int NOT NULL | ||
CONSTRAINT ibexa_token_type_id_fk | ||
REFERENCES ibexa_token_type (id) | ||
ON DELETE CASCADE, | ||
token varchar(255) NOT NULL, | ||
identifier varchar(128) DEFAULT NULL, | ||
created int NOT NULL DEFAULT 0, | ||
expires int NOT NULL DEFAULT 0 | ||
); | ||
``` | ||
|
||
## 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 | ||
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 | ||
``` | ||
|
||
- Corporate access role update: | ||
|
||
```bash | ||
php bin/console ibexa:migrations:import vendor/ibexa/corporate-account/src/bundle/Resources/migrations/2023_05_09_12_40_corporate_access_role_update.yaml --name=2023_05_09_12_40_corporate_access_role_update.yaml | ||
php bin/console ibexa:migration:migrate --file=2023_05_09_12_40_corporate_access_role_update.yaml | ||
``` | ||
|
||
- Shipment permissions: | ||
|
||
```bash | ||
php bin/console ibexa:migrations:import vendor/ibexa/shipping/src/bundle/Resources/install/migrations/shipment_permissions.yaml --name=shipment_permissions.yaml | ||
php bin/console ibexa:migration:migrate --file=shipment_permissions.yaml | ||
``` | ||
|
||
- Order permissions: | ||
|
||
```bash | ||
php bin/console ibexa:migrations:import vendor/ibexa/order-management/src/bundle/Resources/install/migrations/order_permissions.yaml --name=order_permissions.yaml | ||
php bin/console ibexa:migration:migrate --file=order_permissions.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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