schema doesn't install

  1. <?php
  2. // $Id: letters.install,v 1.2 2007/11/07 16:31:47 seanr Exp $
  3. function letters_install() {
  4.   drupal_install_schema('letters');
  5. }
  6.  
  7. function letters_uninstall() {
  8. }
  9.  
  10. /**
  11. * Implementation of hook_schema().
  12. */
  13. function letters_schema() {
  14.   $schema['letters_newspapers'] = array(
  15.     'fields' => array(
  16.       'newsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
  17.       'title' => array('type' => 'varchar', 'not null' => TRUE, 'length' => 255),
  18.       'address' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255),
  19.       'city' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255),
  20.       'state' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 2),
  21.       'zip' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 10),
  22.       'phone' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 15),
  23.       'fax' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 15),
  24.       'email' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255),
  25.       'homepage' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255),
  26.       'statewide' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
  27.     ),
  28.     'indexes' => array(
  29.       'letters_zip' => array('zip')
  30.     ),
  31.     'primary key' => array('newsid'),
  32.   );
  33. }