Magento2 How to override setup:upgrade command class file?
We are currently running stores which are 1000+ and hence clearing/regenerating is a big challenge. For that we are using cron to generate/clear cache but also we want to remove custom sections of code which do the same like setup:upgrade.
So currently I am trying to remove cache clearing code lines and override Magento\Setup\Console\Command\UpgradeCommand
I would like to do the same for Setup:di:compile and setup:static-content:deploy.
I used the preference method but didn't get the results as magento loads the root setup folder in a different way compared to other magento modules.
Re: Magento2 How to override setup:upgrade command class file?
In this article, we will find out how to install and upgrade sql script for module in Magento 2. When you install or upgrade a module, you may need to change the database structure or add some new data for current table. To do this, Magento 2 provide you some classes which you can do all of them.