Magento Module Script – Install & Upgrade – Part 01

Mage Module setup scripts contain some features whom are necessary to insert in DB. Here we’ll learn to install Magento upgrade database for Mage Module setup scripts.

As it is quite clear to us that Magento Module scripts manipulation requires some extra coding skills to execute of successfully. So, being our valuable customer we request to join our network on Aspiration Hosting. By joining now enjoy premier services like CDN, SSD storage, web development and technical support absolutely free of any cost. And remember all of these are available even for our basic Mage Hosting Plan that is USD 9.99 per month. So, join now and enjoy freedom with Aspiration Hosting.
Tanzia Farin Chy – Aspiration Hosting

Magento Module script – Install and Magento Upgrade database

As we discussed earlier, some module setup scripts consist of entries whom need to insert in DB through module. However Mage Attributes come along Mage 2, CMS pages, roles and various default groups and 404 redirection page are good example of the same. Above mentioned examples are directly related to the Mage Data setup.

Right after the Schema setup the data setup is usually performed. Although both of the functions work in identical way.

Magento Module script – post install – Recurring

As it is necessary to run recurring script right after each module setup. Because we believe in the method that Module 1 should work efficiently if any other Modules need to include later.
For example in latest Mage 2 Magento_Indexer module always looks up for new indexers. In such case it’ll add the indexers in to the indexer_state table. For Mage 2 the path is following : Magento\Indexer\Setup\Recurring class

In the next part of the series we will see that Mage Modules also may have the uninstall script. Also the script is very useful to remove module tables. Go to the next article

Now reading Part 01 | Part 02