[support] Drupal 7 Install File Issue

Kamal Palei palei.kamal at gmail.com
Wed Aug 8 02:05:15 UTC 2012


Hi Drupal Experts
Greetings of the day!!!

I am relatively new to Drupal 7.

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.
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).
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?

Did anybody face this problem anytime?
Please let me know what could be the issue here?

--------------------- resmsubmt.install file
--------------------------------

<?php
function resmsubmt_schema() {
  $schema['res_sbmt'] = array(
    'description' => 'The base tables for resume submission.',
    'fields' => array(
      'uid' => array(
        'description' => 'Id of candidate.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'Name of candidate.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array('uid'),
  );

  return $schema;
}

function resmsubmt_uninstall() {
  drupal_uninstall_schema('resmsubmt');
  db_query("DROP TABLE res_sbmt");
  cache_clear_all('variables', 'cache');
}


Regards
Kamal
Necs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120808/d7732d69/attachment.html 


More information about the support mailing list