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'.