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

Fix cross_border_type DB schema upgrade #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaywilliams
Copy link

Running magento setup:upgrade while upgrading from v1.5.13 to v2.2.4 created the following error message:

Module 'ClassyLlama_AvaTax':
Upgrading schema..
Column "cross_border_type" does not exist in table "avatax_cross_border_class".

This pull request fixes this by checking if the column cross_border_type exists prior to attempting to rename it. In my instance the cross_border_type_id column was already in the DB, so renaming was unnecessary.

@ihor-sviziev
Copy link

ihor-sviziev commented Aug 26, 2021

Steps to reproduce:

  1. Upgrade from v1.5.13 to v2.2.4, run php bin/magento setup:upgrade
  2. Downgrade from v2.2.4 to v1.5.13, run php bin/magento setup:upgrade
  3. Execute the following SQL to fix website for registered customers:
    UPDATE eav_attribute set
    source_model=null, frontend_input='text'
    WHERE attribute_code='override_importer_of_record';
  4. Upgrade from v1.5.13 to v2.2.4, run php bin/magento setup:upgrade:

Expected result:
✔ The module should be upgraded

Actual result:
❌ We have error Column "cross_border_type" does not exist in table "avatax_cross_border_class".
image


Actual result with changes from this PR:
✔The module successfully upgraded, command php bin/magento setup:upgrade executed w/o errors

@ihor-sviziev
Copy link

@marynychsv @virtual97, could you review this PR?

@ntoombs19
Copy link
Contributor

ntoombs19 commented Sep 10, 2021

For what it's worth, I'm currently experiencing this issue after upgrading to 2.2.5 on Magento 2.4.3.

I applied this PR as a patch and the issue was resolved.

@virtual97
Copy link
Contributor

Hello @jaywilliams ,

We have created a ticket based on your report.
AVASUP-1119: Fix cross_border_type DB schema upgrade
We keep you posted.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants