trouble in create custom table for custom modelI just can't tell what is wrong with this Model code that...

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

Is it possible to avoid unpacking when merging Association?

Expressing logarithmic equations without logs

How to check whether module is loaded with custom configurations?

Virginia employer terminated employee and wants signing bonus returned

Would an aboleth's Phantasmal Force lair action be affected by Counterspell, Dispel Magic, and/or Slow?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Recommendation letter by significant other if you worked with them professionally?

What's the 'present simple' form of the word "нашла́" in 3rd person singular female?

Can I negotiate a patent idea for a raise, under French law?

What ability score modifier does a javelin's damage use?

Does a difference of tense count as a difference of meaning in a minimal pair?

Is divide-by-zero a security vulnerability?

How do spaceships determine each other's mass in space?

Plausibility of Mushroom Buildings

Can't make sense of a paragraph from Lovecraft

What is better: yes / no radio, or simple checkbox?

What problems would a superhuman have who's skin is constantly hot?

What do *foreign films* mean for an American?

Windows Server Datacenter Edition - Unlimited Virtual Machines

Does "Until when" sound natural for native speakers?

Getting the || sign while using Kurier

I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?



trouble in create custom table for custom model


I just can't tell what is wrong with this Model code that save() is raising an exception.||Model Class FallthroughAccess custom tableUpgrade to 1.9.2.2 - Base table or view already exists: 1050 Table 'mage_permission_variable' already existsCreate a Model for a custom table#1005 - Can't create table 'smartools.sales_flat_quote_item' (errno: -1)adding a image/logo to attributeTruncate table using resource model in Magento 2What and why is the proper way to load a modelinvalid create method













0















I get some trouble in auto create table for model . I create module 'rewardpoint' by moduleCreator and it generate rewardpoint model automatically,But i want to create new Model 'rate' in my module . So , this is my code :



-config.xml



<models>
<rate>
<class>Magestore_Rewardpoint_Model</class>
<resourceModel>rate_mysql4</resourceModel>
</rate>
<rate_mysql4>
<class>Magestore_Rewardpoint_Model_Mysql4</class>
<entities>
<rate>
<table>rewardpoints_rate</table>
</rate>
</entities>
</rate_mysql4>
</models>
<resources>
<rewardpoint_setup>
<setup>
<module>Magestore_Rewardpoint</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</rewardpoint_setup>
<rewardpoint_write>
<connection>
<use>core_write</use>
</connection>
</rewardpoint_write>
<rewardpoint_read>
<connection>
<use>core_read</use>
</connection>
</rewardpoint_read>
</resources>


And in sql folder , i change code too



$installer = $this;

$installer->startSetup();

/**
* create rewardpoint table
*/
$installer->run("

DROP TABLE IF EXISTS {$this->getTable('rewardpoints_rate')};

CREATE TABLE {$this->getTable('rewardpoints_rate')} (
`rate_id` int(11) unsigned NOT NULL auto_increment,
`direction` smallint(6) NOT NULL,
`point` int(11) NOT NULL,
`money` int(11) NOT NULL,
`customer_group` varchar(20) NOT NULL ,
PRIMARY KEY (`rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

");


Then i refesh browser and see my phpadmin result , there's no table name 'rewardpoints_rate'.










share|improve this question

























  • Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

    – Fabian Blechschmidt
    Oct 5 '14 at 6:44
















0















I get some trouble in auto create table for model . I create module 'rewardpoint' by moduleCreator and it generate rewardpoint model automatically,But i want to create new Model 'rate' in my module . So , this is my code :



-config.xml



<models>
<rate>
<class>Magestore_Rewardpoint_Model</class>
<resourceModel>rate_mysql4</resourceModel>
</rate>
<rate_mysql4>
<class>Magestore_Rewardpoint_Model_Mysql4</class>
<entities>
<rate>
<table>rewardpoints_rate</table>
</rate>
</entities>
</rate_mysql4>
</models>
<resources>
<rewardpoint_setup>
<setup>
<module>Magestore_Rewardpoint</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</rewardpoint_setup>
<rewardpoint_write>
<connection>
<use>core_write</use>
</connection>
</rewardpoint_write>
<rewardpoint_read>
<connection>
<use>core_read</use>
</connection>
</rewardpoint_read>
</resources>


And in sql folder , i change code too



$installer = $this;

$installer->startSetup();

/**
* create rewardpoint table
*/
$installer->run("

DROP TABLE IF EXISTS {$this->getTable('rewardpoints_rate')};

CREATE TABLE {$this->getTable('rewardpoints_rate')} (
`rate_id` int(11) unsigned NOT NULL auto_increment,
`direction` smallint(6) NOT NULL,
`point` int(11) NOT NULL,
`money` int(11) NOT NULL,
`customer_group` varchar(20) NOT NULL ,
PRIMARY KEY (`rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

");


Then i refesh browser and see my phpadmin result , there's no table name 'rewardpoints_rate'.










share|improve this question

























  • Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

    – Fabian Blechschmidt
    Oct 5 '14 at 6:44














0












0








0








I get some trouble in auto create table for model . I create module 'rewardpoint' by moduleCreator and it generate rewardpoint model automatically,But i want to create new Model 'rate' in my module . So , this is my code :



-config.xml



<models>
<rate>
<class>Magestore_Rewardpoint_Model</class>
<resourceModel>rate_mysql4</resourceModel>
</rate>
<rate_mysql4>
<class>Magestore_Rewardpoint_Model_Mysql4</class>
<entities>
<rate>
<table>rewardpoints_rate</table>
</rate>
</entities>
</rate_mysql4>
</models>
<resources>
<rewardpoint_setup>
<setup>
<module>Magestore_Rewardpoint</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</rewardpoint_setup>
<rewardpoint_write>
<connection>
<use>core_write</use>
</connection>
</rewardpoint_write>
<rewardpoint_read>
<connection>
<use>core_read</use>
</connection>
</rewardpoint_read>
</resources>


And in sql folder , i change code too



$installer = $this;

$installer->startSetup();

/**
* create rewardpoint table
*/
$installer->run("

DROP TABLE IF EXISTS {$this->getTable('rewardpoints_rate')};

CREATE TABLE {$this->getTable('rewardpoints_rate')} (
`rate_id` int(11) unsigned NOT NULL auto_increment,
`direction` smallint(6) NOT NULL,
`point` int(11) NOT NULL,
`money` int(11) NOT NULL,
`customer_group` varchar(20) NOT NULL ,
PRIMARY KEY (`rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

");


Then i refesh browser and see my phpadmin result , there's no table name 'rewardpoints_rate'.










share|improve this question
















I get some trouble in auto create table for model . I create module 'rewardpoint' by moduleCreator and it generate rewardpoint model automatically,But i want to create new Model 'rate' in my module . So , this is my code :



-config.xml



<models>
<rate>
<class>Magestore_Rewardpoint_Model</class>
<resourceModel>rate_mysql4</resourceModel>
</rate>
<rate_mysql4>
<class>Magestore_Rewardpoint_Model_Mysql4</class>
<entities>
<rate>
<table>rewardpoints_rate</table>
</rate>
</entities>
</rate_mysql4>
</models>
<resources>
<rewardpoint_setup>
<setup>
<module>Magestore_Rewardpoint</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</rewardpoint_setup>
<rewardpoint_write>
<connection>
<use>core_write</use>
</connection>
</rewardpoint_write>
<rewardpoint_read>
<connection>
<use>core_read</use>
</connection>
</rewardpoint_read>
</resources>


And in sql folder , i change code too



$installer = $this;

$installer->startSetup();

/**
* create rewardpoint table
*/
$installer->run("

DROP TABLE IF EXISTS {$this->getTable('rewardpoints_rate')};

CREATE TABLE {$this->getTable('rewardpoints_rate')} (
`rate_id` int(11) unsigned NOT NULL auto_increment,
`direction` smallint(6) NOT NULL,
`point` int(11) NOT NULL,
`money` int(11) NOT NULL,
`customer_group` varchar(20) NOT NULL ,
PRIMARY KEY (`rate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

");


Then i refesh browser and see my phpadmin result , there's no table name 'rewardpoints_rate'.







database model resource-model






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 45 secs ago









Teja Bhagavan Kollepara

2,98641947




2,98641947










asked Oct 5 '14 at 3:25









freeman167freeman167

316




316













  • Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

    – Fabian Blechschmidt
    Oct 5 '14 at 6:44



















  • Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

    – Fabian Blechschmidt
    Oct 5 '14 at 6:44

















Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

– Fabian Blechschmidt
Oct 5 '14 at 6:44





Please read magento.stackexchange.com/questions/428/… to learn how to debug. I would think you have a caching problem. And if this is your complete config.xml you might have missed the point with XML?

– Fabian Blechschmidt
Oct 5 '14 at 6:44










3 Answers
3






active

oldest

votes


















1














I would like to add this as a comment, but then it is unreadable.



You don't need all the XML nodes, because magento adds them automatically:



<resources>
<rewardpoint_setup>
<connection>
<use>core_setup</use>
</connection>
</rewardpoint_setup>
<rewardpoint_write>
<connection>
<use>core_write</use>
</connection>
</rewardpoint_write>
<rewardpoint_read>
<connection>
<use>core_read</use>
</connection>
</rewardpoint_read>




You can remove them if you want.






share|improve this answer































    0














    For run sql_setup you need define resource



    <resources>
    <rate_setup>
    <setup>
    <module>Magestore_Rewardpoint</module>
    </setup>
    <connection>
    <use>core_setup</use>
    </connection>
    </rate_setup>
    <rate_read>
    <connection>
    <use>core_read</use>
    </connection>
    </rate_read>
    <rate_write>
    <connection>
    <use>core_write</use>
    </connection>
    </rate_write>
    </resources>





    share|improve this answer
























    • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

      – freeman167
      Oct 6 '14 at 3:13



















    0














    Also try this



    <?xml version="1.0"?>
    <config>
    <modules>
    <Magestore_Rewardpoint>
    <version>0.1.0</version>
    </Magestore_Rewardpoint>
    </modules>
    <global>
    <helpers>
    <rewardpoint>
    <class>Magestore_Rewardpoint_Helper</class>
    </rewardpoint>
    </helpers>
    <resources>
    <rewardpoint_setup>
    <setup>
    <module>Magestore_Rewardpoint</module>
    </setup>
    <connection>
    <use>core_setup</use>
    </connection>
    </rewardpoint_setup>
    <rewardpoint_write>
    <connection>
    <use>core_write</use>
    </connection>
    </rewardpoint_write>
    <rewardpoint_read>
    <connection>
    <use>core_read</use>
    </connection>
    </rewardpoint_read>
    </resources>
    </global>
    </config>


    Also try this code for appcodelocalMagestoreRewardpointsqlrewardpoint_setupmysql4-install-0.1.0.php



    <?php
    $installer = $this;
    $installer->startSetup();
    $sql=<<<SQLTEXT
    create table rewardpoints_rate('rate_id' int(11) unsigned NOT NULL auto_increment, 'direction' smallint(6) NOT NULL,'point` int(11) NOT NULL,'money' int(11) NOT NULL, 'customer_group' varchar(20) NOT NULL , PRIMARY KEY ('rate_id'));
    SQLTEXT;

    $installer->run($sql);

    $installer->endSetup();


    Hope this will work for you






    share|improve this answer
























    • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

      – freeman167
      Oct 6 '14 at 3:14











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f37993%2ftrouble-in-create-custom-table-for-custom-model%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I would like to add this as a comment, but then it is unreadable.



    You don't need all the XML nodes, because magento adds them automatically:



    <resources>
    <rewardpoint_setup>
    <connection>
    <use>core_setup</use>
    </connection>
    </rewardpoint_setup>
    <rewardpoint_write>
    <connection>
    <use>core_write</use>
    </connection>
    </rewardpoint_write>
    <rewardpoint_read>
    <connection>
    <use>core_read</use>
    </connection>
    </rewardpoint_read>




    You can remove them if you want.






    share|improve this answer




























      1














      I would like to add this as a comment, but then it is unreadable.



      You don't need all the XML nodes, because magento adds them automatically:



      <resources>
      <rewardpoint_setup>
      <connection>
      <use>core_setup</use>
      </connection>
      </rewardpoint_setup>
      <rewardpoint_write>
      <connection>
      <use>core_write</use>
      </connection>
      </rewardpoint_write>
      <rewardpoint_read>
      <connection>
      <use>core_read</use>
      </connection>
      </rewardpoint_read>




      You can remove them if you want.






      share|improve this answer


























        1












        1








        1







        I would like to add this as a comment, but then it is unreadable.



        You don't need all the XML nodes, because magento adds them automatically:



        <resources>
        <rewardpoint_setup>
        <connection>
        <use>core_setup</use>
        </connection>
        </rewardpoint_setup>
        <rewardpoint_write>
        <connection>
        <use>core_write</use>
        </connection>
        </rewardpoint_write>
        <rewardpoint_read>
        <connection>
        <use>core_read</use>
        </connection>
        </rewardpoint_read>




        You can remove them if you want.






        share|improve this answer













        I would like to add this as a comment, but then it is unreadable.



        You don't need all the XML nodes, because magento adds them automatically:



        <resources>
        <rewardpoint_setup>
        <connection>
        <use>core_setup</use>
        </connection>
        </rewardpoint_setup>
        <rewardpoint_write>
        <connection>
        <use>core_write</use>
        </connection>
        </rewardpoint_write>
        <rewardpoint_read>
        <connection>
        <use>core_read</use>
        </connection>
        </rewardpoint_read>




        You can remove them if you want.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 5 '14 at 6:46









        Fabian BlechschmidtFabian Blechschmidt

        33.4k664173




        33.4k664173

























            0














            For run sql_setup you need define resource



            <resources>
            <rate_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rate_setup>
            <rate_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rate_read>
            <rate_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rate_write>
            </resources>





            share|improve this answer
























            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:13
















            0














            For run sql_setup you need define resource



            <resources>
            <rate_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rate_setup>
            <rate_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rate_read>
            <rate_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rate_write>
            </resources>





            share|improve this answer
























            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:13














            0












            0








            0







            For run sql_setup you need define resource



            <resources>
            <rate_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rate_setup>
            <rate_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rate_read>
            <rate_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rate_write>
            </resources>





            share|improve this answer













            For run sql_setup you need define resource



            <resources>
            <rate_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rate_setup>
            <rate_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rate_read>
            <rate_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rate_write>
            </resources>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 5 '14 at 3:37









            Amit BeraAmit Bera

            58.9k1575175




            58.9k1575175













            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:13



















            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:13

















            i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

            – freeman167
            Oct 6 '14 at 3:13





            i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

            – freeman167
            Oct 6 '14 at 3:13











            0














            Also try this



            <?xml version="1.0"?>
            <config>
            <modules>
            <Magestore_Rewardpoint>
            <version>0.1.0</version>
            </Magestore_Rewardpoint>
            </modules>
            <global>
            <helpers>
            <rewardpoint>
            <class>Magestore_Rewardpoint_Helper</class>
            </rewardpoint>
            </helpers>
            <resources>
            <rewardpoint_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rewardpoint_setup>
            <rewardpoint_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rewardpoint_write>
            <rewardpoint_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rewardpoint_read>
            </resources>
            </global>
            </config>


            Also try this code for appcodelocalMagestoreRewardpointsqlrewardpoint_setupmysql4-install-0.1.0.php



            <?php
            $installer = $this;
            $installer->startSetup();
            $sql=<<<SQLTEXT
            create table rewardpoints_rate('rate_id' int(11) unsigned NOT NULL auto_increment, 'direction' smallint(6) NOT NULL,'point` int(11) NOT NULL,'money' int(11) NOT NULL, 'customer_group' varchar(20) NOT NULL , PRIMARY KEY ('rate_id'));
            SQLTEXT;

            $installer->run($sql);

            $installer->endSetup();


            Hope this will work for you






            share|improve this answer
























            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:14
















            0














            Also try this



            <?xml version="1.0"?>
            <config>
            <modules>
            <Magestore_Rewardpoint>
            <version>0.1.0</version>
            </Magestore_Rewardpoint>
            </modules>
            <global>
            <helpers>
            <rewardpoint>
            <class>Magestore_Rewardpoint_Helper</class>
            </rewardpoint>
            </helpers>
            <resources>
            <rewardpoint_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rewardpoint_setup>
            <rewardpoint_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rewardpoint_write>
            <rewardpoint_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rewardpoint_read>
            </resources>
            </global>
            </config>


            Also try this code for appcodelocalMagestoreRewardpointsqlrewardpoint_setupmysql4-install-0.1.0.php



            <?php
            $installer = $this;
            $installer->startSetup();
            $sql=<<<SQLTEXT
            create table rewardpoints_rate('rate_id' int(11) unsigned NOT NULL auto_increment, 'direction' smallint(6) NOT NULL,'point` int(11) NOT NULL,'money' int(11) NOT NULL, 'customer_group' varchar(20) NOT NULL , PRIMARY KEY ('rate_id'));
            SQLTEXT;

            $installer->run($sql);

            $installer->endSetup();


            Hope this will work for you






            share|improve this answer
























            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:14














            0












            0








            0







            Also try this



            <?xml version="1.0"?>
            <config>
            <modules>
            <Magestore_Rewardpoint>
            <version>0.1.0</version>
            </Magestore_Rewardpoint>
            </modules>
            <global>
            <helpers>
            <rewardpoint>
            <class>Magestore_Rewardpoint_Helper</class>
            </rewardpoint>
            </helpers>
            <resources>
            <rewardpoint_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rewardpoint_setup>
            <rewardpoint_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rewardpoint_write>
            <rewardpoint_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rewardpoint_read>
            </resources>
            </global>
            </config>


            Also try this code for appcodelocalMagestoreRewardpointsqlrewardpoint_setupmysql4-install-0.1.0.php



            <?php
            $installer = $this;
            $installer->startSetup();
            $sql=<<<SQLTEXT
            create table rewardpoints_rate('rate_id' int(11) unsigned NOT NULL auto_increment, 'direction' smallint(6) NOT NULL,'point` int(11) NOT NULL,'money' int(11) NOT NULL, 'customer_group' varchar(20) NOT NULL , PRIMARY KEY ('rate_id'));
            SQLTEXT;

            $installer->run($sql);

            $installer->endSetup();


            Hope this will work for you






            share|improve this answer













            Also try this



            <?xml version="1.0"?>
            <config>
            <modules>
            <Magestore_Rewardpoint>
            <version>0.1.0</version>
            </Magestore_Rewardpoint>
            </modules>
            <global>
            <helpers>
            <rewardpoint>
            <class>Magestore_Rewardpoint_Helper</class>
            </rewardpoint>
            </helpers>
            <resources>
            <rewardpoint_setup>
            <setup>
            <module>Magestore_Rewardpoint</module>
            </setup>
            <connection>
            <use>core_setup</use>
            </connection>
            </rewardpoint_setup>
            <rewardpoint_write>
            <connection>
            <use>core_write</use>
            </connection>
            </rewardpoint_write>
            <rewardpoint_read>
            <connection>
            <use>core_read</use>
            </connection>
            </rewardpoint_read>
            </resources>
            </global>
            </config>


            Also try this code for appcodelocalMagestoreRewardpointsqlrewardpoint_setupmysql4-install-0.1.0.php



            <?php
            $installer = $this;
            $installer->startSetup();
            $sql=<<<SQLTEXT
            create table rewardpoints_rate('rate_id' int(11) unsigned NOT NULL auto_increment, 'direction' smallint(6) NOT NULL,'point` int(11) NOT NULL,'money' int(11) NOT NULL, 'customer_group' varchar(20) NOT NULL , PRIMARY KEY ('rate_id'));
            SQLTEXT;

            $installer->run($sql);

            $installer->endSetup();


            Hope this will work for you







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 5 '14 at 18:02









            Dharmen GunawatDharmen Gunawat

            15610




            15610













            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:14



















            • i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

              – freeman167
              Oct 6 '14 at 3:14

















            i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

            – freeman167
            Oct 6 '14 at 3:14





            i fixed it , its because this module has run before . so i have to delete its cache from core_resource . thank you

            – freeman167
            Oct 6 '14 at 3:14


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f37993%2ftrouble-in-create-custom-table-for-custom-model%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

            How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

            變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...