Easiest way to Re Run Magento Module setup
As a developer we guys needs to create custom modules as per our project requirement.To do this we can use ModuleCreator extenstion of magento.
Let we have already created and installed a custom module with our project and after some time due to any change in flow if we need to make a new field in our modules database table then the easiest way is to modify your modules setup file which is available at
app/local/Namespace/ModuleName/sql/Modulename_setup/mysql4-install-0.1.0.php
here we will simply modify the sql query into the install file . Now we have to re-run magento setup for this module so that we can get our database table updated.
To Re-Run magento setup we will follow the easiest way
Step 1: Delete your module table (take backup if you have some data in it)
Step 2: Delete your modules entry from core_resource table
Step 3: Now refresh the browser with the URL that will call this module.As soon as you refresh the browser magento will automatically create the new database table and a new entry in core_resource table.
Now enjoy….
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments