Installation & Usage - acmenna/mage-db-migrations GitHub Wiki

  1. Install Db Migrations as a regular Magento module.

  2. Create your own custom module that will be taking advantage of db migrations

Example Config: <config> <modules> <Foo_Bar> <version>0.1.1</version> </Foo_Bar> </modules> <global> <models> <foo_bar> <class>Foo_Bar_Model</class> </foo_bar> </models> <resources> <foo_bar_setup> <setup> <module>Foo_Bar</module> <class>Db_Migrations_Model_Resource_Setup</class> <!-- Db Migrations --> </setup> </foo_bar_setup> </resources> </global> </config>

  1. The Magento base functionality only worked with install & upgrade scripts such as mysql4-upgrade-0.1.0-0.1.1.php. Now you can add your own rollback scripts noted as below! mysql4-rollback-0.1.2-0.1.1.php, mysql4-rollback-0.1.1-0.1.0.php, etc.

  2. It’s time to play with your module’s xml config version & core_resource table and see it working!

Let me know if you find bugs/issues

⚠️ **GitHub.com Fallback** ⚠️