Create database table using Drupal hook_schema()
<p>For the last few hours I have been trying to create database table in my custom module with no luck!! The documentation says that you only need to implement hook_schema in Drupal 7 and the Drupal takes care of creating the table during module installation. I just cant figure out why the table is not created. I tried installing the module through Drupal admin as well as pasting in the module folder but it still doesnt work.</p>

<p>Here is my function inside .install file:</p>

<pre><code>/**
 * @return array an array containing table's field definitions
 * to be created by drupal schema api
 */
function inquiry_form_schema() {

  $schema['inquiry_form'] = array(
    'description' =&gt; 'Table to record inquiries submitted by staff',
    'fields' =&gt; array(
      'ID' =&gt; array(
        'description' =&gt; 'The primary key of the table',
        'type' =&gt; 'serial',
        'size' =&gt; 'big',
        'not null' =&gt; TRUE,
      ),
      'sender' =&gt; array(
        'description' =&gt; 'The person who submits the inquiry',
        'type' =&gt; 'varchar',
        'length' =&gt; '100',
        'not null' =&gt; TRUE,
      ),
      'subject' =&gt; array(
        'description' =&gt; 'Title of the inquiry being submitted',
        'type' =&gt; 'char',
        'length' =&gt; '100',
        'not null' =&gt; TRUE,
      ),
      'department' =&gt; array(
        'description' =&gt; 'The department that the inquiry is being referenced to',
        'type' =&gt; 'varchar',
        'length' =&gt; '100',
        'not null' =&gt; TRUE,
      ),
      'description' =&gt; array(
        'description' =&gt; 'Detailed explanation of the issue the sender is experiencing',
        'type' =&gt; 'text',
        'not null' =&gt; TRUE,
      ),
//      'date' =&gt; array(
//        'description' =&gt; 'Date of the inquiry being submitted',
//        'mysql_type' =&gt; 'datetime',
//        'not null' =&gt; TRUE,
//      ),
    ),
    'primary key' =&gt; array('ID'),
  );

  return $schema;
}
</code></pre>