StartSetup(); if(!$context->getVersion()){ //no previous version found, installation, InstallSchema was just executed //be careful, since everything below is true for installation ! } if(version_compare($context->getVersion(), '1.0.1') < 0){ //code to upgrade to 1.0.1 } if(version_compare($context->getVersion(), '1.0.3') < 0){ //code to upgrade to 1.0.3 } $setup->endSetup(); } }