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

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

merged 7 commits into from
May 11, 2023

Conversation

MagdalenaZuba
Copy link
Contributor

@MagdalenaZuba MagdalenaZuba commented Apr 27, 2023

Question Answer
JIRA Ticket N/A
Versions all
Edition all

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

Copy link
Contributor

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

I've tested this guide together with https://github.com/ibexa/installer/pull/99/ and https://github.com/ibexa/installer/pull/101

  1. There are new tables, available in the OSS version, that don't have an upgrade script (ibexa_token and ibexa_token_type)
    Added in IBX-5314: Implemented token storage core#217

  2. There's no mention of the Shipment and Order policies added by default

I think these two migrations are responsible for them:
https://github.com/ibexa/shipping/blob/main/src/bundle/Resources/install/migrations/shipment_permissions.yaml
https://github.com/ibexa/order-management/blob/main/src/bundle/Resources/install/migrations/order_permissions.yaml

  1. There are differences in database schema between normal installation and an upgrade

a) ibexa_payment table:
in our schema the owner field is nullable: https://github.com/ibexa/payment/blob/main/src/bundle/Resources/config/schema.yaml#L121-L123
in the script it's not: https://github.com/ibexa/installer/pull/101/files#diff-3acc61ccaf8c51bec0207363c084661b3c914faf7facef830a3402512dc7a557R418

b) ibexa_order table:
the identifier column does not have the uuid type after the upgrade
the lenght of the source column has different lenghts (190 vs 255)

https://github.com/ibexa/order-management/blob/main/src/bundle/Resources/config/schema.yaml#L10-L26
https://github.com/ibexa/installer/blob/5416-added-shipping-upgrade-scripts/upgrade/db/postgresql/commerce/ibexa-4.4.latest-to-4.5.0.sql#L9

left side - upgraded
right - reference 4.5
obraz

### 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)


- 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

@konradoboza
Copy link
Contributor

There are differences in database schema between normal installation and an upgrade

This should be fixed via:
https://github.com/ibexa/installer/pull/99/commits/d11557bcbf5713294481c4bb7e8eee28fb734694
https://github.com/ibexa/installer/pull/101/commits/734c1295e1f96bc9a61eb843bf20e69876a18a9b

@MagdalenaZuba MagdalenaZuba requested a review from mnocon May 8, 2023 09:44
@ciastektk
Copy link
Contributor

I've tested this guide together with ibexa/installer#99 and ibexa/installer#101

  1. There are new tables, available in the OSS version, that don't have an upgrade script (ibexa_token and ibexa_token_type)
    Added in IBX-5314: Implemented token storage ibexa/core#217

Upgrade scripts for token tables: https://github.com/ibexa/installer/pull/105

Copy link
Contributor

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

It works! 🎉

@MagdalenaZuba MagdalenaZuba merged commit 643c6e3 into master May 11, 2023
@MagdalenaZuba MagdalenaZuba deleted the update_4.5 branch May 11, 2023 11:49
MagdalenaZuba added a commit that referenced this pull request May 11, 2023
MagdalenaZuba added a commit that referenced this pull request May 11, 2023
MagdalenaZuba added a commit that referenced this pull request May 11, 2023
MagdalenaZuba added a commit that referenced this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants