hook_schema is not creating database table The following function is contained in process_login.install as part of a custom module called process_login. The module works if I manually created the database table, but naturally I would like the table created automatically on install.

The function itself does not generate a schema error on installing the module. But neither does it create the database table process_login_register in the Drupal 7 MySQL database.

There are no other errors I can see, or problems reported by Site Report.

I have removed it completely and reinstalled numerous times. I have searched the web extensively, and consulted two books I have on Drupal development. I can't see anything wrong with this function (listed below).

NOTE: I have also tried defining 'id' as serial but get the same result (i.e. no table created).

I have run out of ideas. Does anybody know why this function isn't working?

function process_login_schema(){
  $schema['process_login_register'] = array(
        'description' =&gt; 'Register a specific computer with the system.',
        'fields' =&gt; array(
                'id' =&gt; array(
                    'description' =&gt; 'Primary identifier.',
                    'type' =&gt; 'int',
                    'unsigned' =&gt; TRUE,
                    'size' =&gt; 'normal',
                    'not null' =&gt; TRUE,
                    'default' =&gt; 0,
                ),
                'ip' =&gt; array(
                        'description' =&gt; "The user's IP address at registration.",
                        'type' =&gt; 'varchar',
                        'length' =&gt; 32,
                        'not null' =&gt; TRUE,
                        'default' =&gt; '',
                ),
                'user_agent' =&gt; array(
                        'description' =&gt; "The user's browser user agent string at registration.",
                        'type' =&gt; 'varchar',
                        'length' =&gt; 255,
                        'not null' =&gt; TRUE,
                        'default' =&gt; '',
                ),
        ),
        'primary key' =&gt; array('id'),
  );
  return $schema;
}
Use drush dre -y [module] which disables, uninstalls and then re-enables the module. The -y flag makes it even faster, avoiding you have to press y and enter three times.