Hi Drupal Experts<br>Greetings of the day!!!<br><br>I am relatively new to Drupal 7.<br><br>I am facing a strange issue. Want to create a table during install of my module. My install file looks as below. My custom module name is resmsubmt.<br>
I have tried several hours (with clearing cache etc..), only 1 time I saw the table was created. I deleted that table manually (using phpmyadmin and sql statement).<br>After that I cleared cache, tried with different table names , always I find the table is not created after installing and enabling my module. Drupal shows module is installed successfully, I enable the module, I do not get any error, then why table is not getting created?<br>
<br>Did anybody face this problem anytime?<br>Please let me know what could be the issue here?<br><br>--------------------- resmsubmt.install file --------------------------------<br><br><?php<br>function resmsubmt_schema() {<br>
$schema['res_sbmt'] = array(<br> 'description' => 'The base tables for resume submission.',<br> 'fields' => array(<br> 'uid' => array(<br> 'description' => 'Id of candidate.',<br>
'type' => 'serial',<br> 'unsigned' => TRUE,<br> 'not null' => TRUE,<br> ),<br> 'name' => array(<br> 'description' => 'Name of candidate.',<br>
'type' => 'varchar',<br> 'length' => 64,<br> 'not null' => TRUE,<br> 'default' => '',<br> ),<br> ),<br> 'primary key' => array('uid'),<br>
);<br><br> return $schema;<br>}<br><br>function resmsubmt_uninstall() {<br> drupal_uninstall_schema('resmsubmt');<br> db_query("DROP TABLE res_sbmt");<br> cache_clear_all('variables', 'cache');<br>
}<br><br><br>Regards<br>Kamal<br>Necs<br>