Magento Certified Developer GuideCategory: 4. DatabaseUnder which circumstances are setup scripts executed
Manish Prakash Staff asked 5 years ago

Setup scripts are executed when the the module version in configuration file and module version in core/resource table don’t match.

If config module version is less than db version, then upgrade/install script is executed depending if module was previously installed or not.

If config module version is more than db version, then rollback process is executed. Rollback is very rarely used.