title: Why won't this schema install file work in Drupal 7?
body: <p>I have the following schema defined in the file 'doodil.install' as part of a custom module I'm writing.  Every time I enable the module in Drupal, however, I get a white screen of death.  The code for doodil.install is shown below:</p>
  
  <pre><code>&lt;?php
  function doodil_schema() {
      $schema['doodil_user'] = array(
        'description' =&gt; t('The table containing users who have signed up for the chance to register.'),
        'fields' =&gt; array(
          'id' =&gt; array(
          'description' =&gt; t('Primary Key ID'),
          'type' =&gt; 'serial',
          'unsigned' =&gt; TRUE,
          'not null' =&gt; TRUE,
        ),
        'email_address' =&gt; array(
          'description' =&gt; t('User\'s Email Address'),
          'type' =&gt; 'varchar',
          'length' =&gt; 255,
          'not null' =&gt; TRUE,
        ),
        'first_name' =&gt; array(
          'description' =&gt; t('User\'s First Name'),
          'type' =&gt; 'varchar',
          'length' =&gt; 255,
          'not null' =&gt; TRUE,
        ),
        'last_name' =&gt; array(
          'description' =&gt; t('User\'s Last Name'),
          'type' =&gt; 'varchar',
          'length' =&gt; 255,
        ),
        'user_hash' =&gt; array(
          'description' =&gt; t('A unique hash string to ID the User'),
          'type' =&gt; 'varchar',
          'length' =&gt; 100,
          'not null' =&gt; TRUE,
        ),
        'active' =&gt; array(
          'description' =&gt; t('Whether the account has been activated'),
          'type' =&gt; 'int',
          'not null' =&gt; TRUE,
          'default' =&gt; 0,
        ),
        'successful_invites' =&gt; array(
          'description' =&gt; t('The number of invites responded to'),
          'type' =&gt; 'int',
          'not null' =&gt; TRUE,
          'default' =&gt; 0,
        )
      ),
      'primary key' =&gt; array( 'id' ),
    );
  
    // Return the Table Schema
    return $schema;
  }
  </code></pre>
  
  <p>This is the module file:</p>
  
  <pre><code>&lt;?php
  // $Id$
  /**
  * @file
  * A module for encouraging users to sign up to Doodil, the hottest social
  * network on the web.
  *
  * This module encourages users to invite their friends to sign up to Doodil
  */
  
  define('USER_SIGNUP_CONFIRM_EMAIL',
  'Hi !firstname,
  
  You\'re just one step away from being able to invite your friends to Doodil - the hottest Social Network on the web!  Just click the link below and you\'ll be all set to earn some invite points.
  
  !confirmlink
  
  See you soon!
  
  Team Doodil');
  
  /**
  * Implements hook_help().
  */
  function doodil_help($path, $arg) {
    if ($path == 'admin/help#doodil') {
      return t('A module to encourage users to invite their friends to sign up to Doodil.');
    }
  }
  
  /**
  * Implements hook_menu().
  */
  function doodil_menu() {
    // Create an Array of Menu Items
    $items = array();
  
    // Add the Initial "Sign Up" Item
    $items['doodil/signup'] = array(
      'title' =&gt; 'Sign up to Doodil',
      'description' =&gt; 'Sign up to Doodil and invite your friends',
      'page callback' =&gt; 'drupal_get_form',
      'page arguments' =&gt; array('doodil_signup_form'),
      'access callback' =&gt; TRUE,
      'type' =&gt; MENU_CALLBACK,
    );
  
    // Add the Sign Up from Invitation Item
    $items['doodil/signup/%'] = array(
      'title' =&gt; 'Sign up to Doodil',
      'description' =&gt; 'Sign up to Doodil and invite your friends',
      'page callback' =&gt; 'drupal_get_form',
      'page arguments' =&gt; array('doodil_signup_form', 1),
      'access callback' =&gt; TRUE,
      'type' =&gt; MENU_CALLBACK,
    );
  
    // Add the Invitation Page
    $items['doodil/invite/%'] = array(
      'title' =&gt; 'Invite your Friends to Doodil',
      'description' =&gt; 'Invite your Friends to join Doodil',
      'page callback' =&gt; 'drupal_get_form',
      'page arguments' =&gt; array('doodil_invite_form', 1),
      'access callback' =&gt; TRUE,
      'type' =&gt; MENU_CALLBACK,
    );
  
    // Return the Items Array
    return $items;
  }
  
  function doodil_signup_form($form, &amp;$form_args, $uhash = null, $fullsize = TRUE) {
    // Determine the Size of the Form (Full Size for Page, Small for Block)
    if ($fullsize) {
      $width = '100';
    } else {
      $width = '20';
    }
  
    // [input text] First Name
    $form['first_name'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('First Name'),
      '#size' =&gt; $width,
    );
  
    // [input text] Last Name
    $form['last_name'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Last Name'),
      '#size' =&gt; $width,
    );
  
    // [input text] Email Address
    $form['email_address'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Email Address'),
      '#size' =&gt; $width,
    );
  
    // [input hidden] User Hash
    $form['user_hash'] = array(
      '#type' =&gt; 'hidden',
      '#value' =&gt; $uhash,
    );
  
    // [input submit] Sign Me Up
    $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#title' =&gt; t('Sign Me Up'),
      '#value' =&gt; t('Sign Me Up'),
    );
    return $form;
  }
  
  function doodil_signup_form_submit($form, $form_args) {
    // Get the Base URL
    global $base_url;
  
    // Create a Unique Hash Key
    $user_hash = substr(md5($form_args['values']['email_address'].microtime(true)), 0, 15);
  
    // Create a Confirm User Link
    $confirm_link = $base_url.'/doodil/confirm_signup/'.$user_hash;
  
    // Insert the User into the Table
    drupal_write_record('doodil_user', array(
      'email_address' =&gt; $form_args['values']['email_address'],
      'first_name' =&gt; $form_args['values']['first_name'],
      'last_name' =&gt; $form_args['values']['last_name'],
      'user_hash' =&gt; $user_hash,
    ));
  
    // Build an "Account Array"
    $account = array(
      'first_name' =&gt; $form_args['values']['first_name'],
      'last_name' =&gt; $form_args['values']['last_name'],
      'email_address' =&gt; $form_args['values']['email_address'],
      'confirm_link' =&gt; $confirm_link,
    );
  
    // Send the Email
    drupal_mail(
      'doodil',
      'signup_confirm',
      $account['email_address'],
      language_default(),
      $account,
      variable_get('site_mail', NULL),
      TRUE
    );
  
    // Do some Stuff here like email user and add to temp users table?
    $message = t('A confirmation email has been sent to !email.',
      array(
        '!email' =&gt; $form_args['values']['email_address'],
        '!uhash' =&gt; $form_args['values']['user_hash'],
      ));
  
    // Send a Message
    drupal_set_message($message);
  }
  
  function doodil_invite_form($form, &amp;$form_args, $uhash) {
    // Make the Form Element an Array
    $form['email_address']['#tree'] = true;
  
    // Loop through and add 10 Fields
    for ($i = 1; $i &lt;= 10; $i++) {
      $form['email_address'][$i] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Friend !number\'s Email Address', array('!number' =&gt; $i)),
      );
    }
  
    // [input submit] Sign Me Up
    $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#title' =&gt; t('Invite Friends'),
      '#value' =&gt; t('Invite Friends'),
    );
  
    // Return the Form
    return $form;
  }
  
  /**
  * Implements hook_block_info().
  */
  function doodil_block_info() {
    // Create an Array of Blocks
    $blocks = array();
  
    // Add the Sign Up Block
    $blocks['signup_form'] = array(
      'info' =&gt; t('Doodil Signup Form.'),
      'cache' =&gt; DRUPAL_NO_CACHE,
    );
  
    // Return the Blocks
    return $blocks;
  }
  
  /**
  * Implements hook_block_view().
  */
  function doodil_block_view($block_name = '') {
    // Figure out which block to show
    switch($block_name) {
      case('signup_form'):
        $block = array(
          'subject' =&gt; null,
          'content' =&gt; drupal_get_form('doodil_signup_form', null, FALSE),
        );
      break;
    }
  
    // Return the Block View
    return $block;
  }
  
  /**
  * Implements hook_mail().
  */
  function doodil_mail($key, &amp;$message, $params) {
    switch($key) {
      case('signup_confirm'):
        //$account = (object) $params;
        $subject = t('Welcome to Doodil');
        $body = USER_SIGNUP_CONFIRM_EMAIL;
  
        $message['to'] = $params['email_address'];
        $message['subject'] = $subject;
        $message['body'][] = t(USER_SIGNUP_CONFIRM_EMAIL, array(
      '!firstname' =&gt; $params['first_name'],
      '!confirmlink' =&gt; $params['confirm_link']
        ));
      break;
    }
  
    // Return the Message Array
    return $message;
  }
  </code></pre>