cancel
Showing results for 
Search instead for 
Did you mean: 

Facing issues when upgrading Magento from 2.1.9 to latest.

Facing issues when upgrading Magento from 2.1.9 to latest.

Hi All,

 

I am facing repeated issues while upgrading Magento form version 2.1.9 to latest i.e. 2.3.3.

 

Steps followed for upgrade:

* Download the composer.json of same version of Magento.

* Replace require and require-dev section of composer.json of project from that of default Magento of same version.

* composer update

* bin/magento setup:upgrade

 

The approach that I have decided to continue is mentioned here:

https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Foreign-key-constraint-is-incorrectly-...

 

I am following:

  1. Upgrade the magento 2.1.9 to 2.1.18 ( Stable/Latest version of magento 2.1 release).
  2. Then upgrade 2.1.18 to 2.2.8 ( Stable/Latest version of magento 2.2 release).
  3. After that upgrade the magento 2.2.8 to 2.3.3 ( Stable/Latest version of magento 2.3 release).

Issue:

There was no issue in step 1.

In step 2 there was no issue in composer update but on setup:upgrade Magento_Catalog module upgrade is running in an endless process.

Setup Upgrade of Magento_Catalog is not ending even in days.

 

I know that there is an issue already listed in Magento Git regarding this i.e. 

https://github.com/magento/magento2/issues/13553

I followed the solution mentioned here i.e. increasing the batch size from '100' to '100000', but still it seems as if no resposne.

My store is in EE version having split database consisting of around 2,20,000 products and 12 stores.

 

How is it possible to track the progress of setup:upgrade of Magento_Catalog module upgrade ?

 

Also I checked and there is nothing in the log as well. Only debug.log keeps on updating with  some entry of main.DEBUG: cache_invalidate

 

Also I would like to know if we can direct update from 2.1.9 to 2.3.3. 

I tried doing so and composer update went fine but after that on setup:upgrade I was repeatedly getting the integrity constraints violation errors, so I switched to upgrade in steps mentioned above.

 

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`my_database`.`#sql-66eb_3bb`, 
CONSTRAINT `CAT_PRD_ENTT_DEC_ROW_ID_CAT_PRD_ENTT_ROW_ID` FOREIGN KEY (`row_id`) REFERENCES `catalog_product_entity` (`row_id`) ON DELETE CASCADE), 
query was: ALTER TABLE `catalog_product_entity_decimal` MODIFY COLUMN `value` decimal(20, 6)  NULL  COMMENT "Value", DROP KEY 
`CATALOG_PRODUCT_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID`, ADD CONSTRAINT `CAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY 
(`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`)  ON DELETE CASCADE, ADD CONSTRAINT 
`CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`)  
ON DELETE CASCADE, ADD CONSTRAINT `CAT_PRD_ENTT_DEC_ROW_ID_CAT_PRD_ENTT_ROW_ID` FOREIGN KEY (`row_id`) REFERENCES 
`catalog_product_entity` (`row_id`)  ON DELETE CASCADE, ADD CONSTRAINT 
`CATALOG_PRODUCT_ENTITY_DECIMAL_ROW_ID_ATTRIBUTE_ID_STORE_ID` UNIQUE KEY (`row_id`,`attribute_id`,`store_id`)

 

Has anyone ran into the same issue. If so please help.

4 REPLIES 4

Re: Facing issues when upgrading Magento from 2.1.9 to latest.

Hello @narendra_vyas 

 

https://drops.meetanshi.com/ffPBbC

 

Upgrade with the above-mentioned sequence but using composer CLI commands. It will give better results.

Refer https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html for the guide to upgrade Magento using CLI command

 

Make sure you have a backup of files and database current Magento 2.1.9

 

Hope it helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: Facing issues when upgrading Magento from 2.1.9 to latest.

Hi @Meetanshi ,

 

So you suggest upgrading directly form 2.1.9 to 2.3.3 ???

 

I tried the same but as mentioned that I was getting that integrity constraints issue mentioned above.

 

Any idea how to resolve that ?  

Re: Facing issues when upgrading Magento from 2.1.9 to latest.

Hi @Meetanshi ,

 

I am already following the steps mentioned in docs.

 

The issue I am facing in upgrade is that in setup:upgrade Mageento_Catalog is not ending and setup upgrade sets stuck there.

 

I have also attached a link of github issue regarding the same.

 

How can I track the process of setup upgrade ?

 

I think I am facing this issue due to huge number of products and store so how to get rid of that.

 

FYI: composer update went well and vendor is updated the issue on upgrading in setps is that I am getting stuck in setup upgrade.

 

Any help ?

Re: Facing issues when upgrading Magento from 2.1.9 to latest.

Hello @narendra_vyas 

 

can you please try to upgrade from 2.1.9 to 2.2.0. 

once you successfully upgrade than try to upgrade from 2.2.0 to 2.3.0 and than 2.3.3 

 

Please try this may be this will help you.

 

Problem solved? Click Accept as Solution!

 

Thank you

Anant P

Thank you
Anant Prajapati
Magento Certified Developer