[BUGFIX] Solved error while upgrading from 2.1 to 2.2 #11735
Merged
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.
Same as #11651
Given error while running setup:upgrade:
Problem is solved by setting tax_postcode to * if it was NULL
Description
When you try to upgrade from 2.1 to 2.2 and you have the following two tax rates in your 2.1 installation:
Rate 1:
Rate 2:
Insert query for these rates is:
INSERT INTO `tax_calculation_rate` (`tax_calculation_rate_id`, `tax_country_id`, `tax_region_id`, `tax_postcode`, `code`, `rate`, `zip_is_range`, `zip_from`, `zip_to`) VALUES (1, 'US', 12, NULL, 'US-CA-*-Rate 1', 8.2500, NULL, NULL, NULL), (5, 'US', 43, NULL, 'US-NY-*-Rate 1', 8.3750, NULL, NULL, NULL)
Fixed Issues (if relevant)
Manual testing scenarios
Apply changes and the data will be changed automatically and this manual query is no longer needed:
UPDATE tax_calculation_rate SET tax_postcode = '*' WHERE tax_postcode IS NULL
tax_calculation_rate table before:
tax_calculation_rate table after:
Contribution checklist