Magento Install and Upgrade Data Scripts Explained

Hi Chirag,

Since Magento 1.6.x, we have good changes in Resources mainly to support others databases.
The mysql4 classes are deprecated and the Magento only keep it up to backwards compatibility.

To show a little example, i caught part of config.xml from Mage/Customer:

    <customer_resource>
        <class>Mage_Customer_Model_Resource</class>
        <deprecatedNode>customer_mysql4</deprecatedNode>
            <entities>
                <entity>
                    <table>customer_entity</table>
                </entity>
                <address_entity>
                    <table>customer_address_entity</table>
                </address_entity>
             </entities>
            <!-- .... -->
    </customer_resource>

Another point that few people use or remember is that the Magento has a directory to install the module data called “data” and this has the same “sql” directory scheme.

We can see practical examples studying the Magento Core modules.

Sorry the long comment and congratulations :smiley: