Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Magento support downgrade / rollback scripts for modules?

Tags:

magento

I noticed in the Magento Certified Developer Study Guide, under the Database section one of the items mentioned is "Write downgrade (rollback) scripts".

I've done some searching to see whether downgrade scripts are supported and it seems they are not. I found this thread from earlier this year in which it seems they concluded that downgrade scripts weren't supported at that time.

Also, did some searching on google and found this article discussing what appears to be some initial support for rollback scripts in the core.

I also searched under app/code/core/Mage for "rollback" and "downgrade" and pretty much most of what I found was code related to DB transaction rollbacks.

Why would the study guide be talking about this if it's not supported? I must be missing something.

like image 256
kalenjordan Avatar asked Dec 27 '11 08:12

kalenjordan


1 Answers

Current versions of Magento have no implementation for rollback database migration scripts, where rollback means identifying that a module version number has decreased and running an appropriate script.

Remember through, you're looking at a study guide, not a manual.

While there's no support for formal rollbacks in the current version of Magento, as a Magento developer you may need to rollback database changes made in a previous module upgrade. I'd be ready for questions that describe that scenario, with answers that test your knowledge of existing Magento functionality.

like image 194
Alan Storm Avatar answered Oct 02 '22 08:10

Alan Storm