Fix for Fix for Fix for Issue with hook_schema and installing a module -- installer doesn't like my schema

  1. $schema['sites'] = array(
  2.     'description' => t('Stores site names and private keys'),
  3.     'fields' => array(
  4.       'sid' => array(
  5.         'type' => 'serial',
  6.         'unsigned' => TRUE,
  7.         'not null' => TRUE,
  8.         'description' => t('A number identifying a site'),
  9.       ),
  10.       'sitename' => array(
  11.         'type' => 'varchar',
  12.         'not null' => TRUE,
  13.         'size' => 'normal',
  14.         'description' => t('The site name for the record'),
  15.       ),
  16.       'sitepk' => array(
  17.         'type' => 'varchar',
  18.         'not null' => TRUE,
  19.         'size' => 'norma
  20.        'description' => t('The private key of the child site'),
  21.      ),
  22.      'ctime' => array(
  23.        'type' => 'int',
  24.        'not null' => TRUE,
  25.        'default' => 0,
  26.        'description' => t('A UNIX timestamp indicating when the site was added'),
  27.      ),
  28.    ),
  29.    'primary key' => array(
  30.      '
  31.     ),
  32.   );
  33.  
  34.  
  35.  
  36. /*
  37. user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, `sitepk` VARCHAR NOT NULL, `ctime` INT NOT NULL DEFAULT 0, PRIMARY ' at line 3 query: CREATE TABLE sites ( `sid` INT unsigned NOT NULL auto_increment, `sitename` VARCHAR NOT NULL, `sitepk` VARCHAR NOT NULL, `ctime` INT NOT NULL DEFAULT 0, PRIMARY KEY (sid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /Applications/xampp/xamppfiles/htdocs/includes/database.inc on line 515.
  38. */

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.