6

i created a module vendor... i also created a sql script.. bt when i remove my module from site.....then whole thing is fine...

bt when i re install my module then my sql script is not working..... my question is how to re install my custom module with sql script.....

when we remove local module then after removing my i also removed table... bt when i re install whole thing is fine bt sql script is not working

my config..

<?xml version="1.0" encoding="UTF-8" ?>
<config>
    <!-- module configuration -->
    <modules>
        <Webcreon_Seller>
            <version>1.0.0</version>
        </Webcreon_Seller>
    </modules>
    <!-- module configuration end -->
    <frontend>
        <routers>
            <seller>
                <use>standard</use>
                <args>
                    <module>Webcreon_Seller</module>
                    <frontName>seller</frontName>  
                </args>
            </seller>
        </routers>
     <layout>
            <updates>
                <seller>
                      <file>sellerform.xml</file>
                </seller>
            </updates>
       </layout>
    </frontend>
    <admin>
     <routers>
         <seller>
            <use>admin</use>
            <args>
               <module>Webcreon_Seller</module>
               <frontName>adminseller</frontName>
            </args>
         </seller>
      </routers>
 </admin>
 <adminhtml>
   <layout>
      <updates>
          <seller>
              <file>sellerform.xml</file>
           </seller>
      </updates>
   </layout>
   <menu>
      <customer translate="title" module="adminhtml">

         <sort_order>100</sort_order>
         <children>
             <set_time>
                   <title>Seller List</title>
                   <action>adminseller/adminhtml_index</action>
              </set_time>
          </children>
       </customer>
    </menu>
</adminhtml> 

    <global>
        <blocks>
            <seller>
                <class>Webcreon_Seller_Block</class>
            </seller>
         </blocks>
         <helpers>
            <seller>
                <class>Webcreon_Seller_Helper</class>
            </seller> 
        </helpers>
              <models>
          <seller>
                <class>Webcreon_Seller_Model</class>
                 <resourceModel>seller_mysql4</resourceModel>
            </seller> 
            <seller_mysql4>
             <class>Webcreon_Seller_Model_Mysql4</class>
             <entities>
                 <seller>
                   <table>db_vendor</table>
                 </seller>
              </entities>
          </seller_mysql4>
        </models>
        <resources>
        <!-- connection to write -->
        <seller_write>
            <connection>
                <use>core_write</use>
            </connection>
        </seller_write>
        <!-- connection to read -->
       <seller_read>
          <connection>
             <use>core_read</use>
          </connection>
       </seller_read>
       <webcreon_seller_setup>
            <setup>
                <module>Webcreon_Seller</module>
            </setup>
        </webcreon_seller_setup>
</resources>
<rewrite>
    <sellercreate>
         <from><![CDATA[#^/seller[\/]?$#]]></from>
         <to><![CDATA[/seller/seller/sellercreate/$1]]></to>
         <complete>1</complete>
      </sellercreate>
</rewrite>
</global>


</config>
15

in your custom module's sql folder their is a folder with yourmodule_setup,you have to delete yourmodule_setup record from the core_resource table and just refresh the browser your script will run again.

  • In core_resource table i did not found MYMODULE_setup why. – Amitesh Kumar Jan 25 '17 at 6:06
0

I guess there's a row left in the core_resource table for your module. Delete this and reinstall your module including the table should work.

0

You can reinstall the module by deleting its record from the database with the following SQL. Assuming that the module is in Vendorname/Modulename then use the following SQL command:

DELETE FROM core_resource WHERE code = 'vendorname_modulename_setup';

Then flush caches etc and go to the appropriate page where your module is used to reload it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.