Hey guys,
with the following hook_schema implementation
function mymodule_schema() {
$schema['mymodule_rent'] = array(
'description' => 'The rent table.',
'fields' => array(
'id' => array(
'description' => 'The primary identifier.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'description' => 'The User who rents the item.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'title' => array(
'description' => 'The rent project name.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'from_ts' => array(
'description' => 'The Unix timestamp when the user took the item.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'till_ts' => array(
'description' => 'The Unix timestamp when the returned the item.',
'type' => 'int',
'not null' => FALSE,
'default' => 0,
),
),
/** 'unique keys' => array(
'id_uid' => array('id', 'uid'),
),
*/
'primary key' => array('id'),
);
when enabling the module i get
Warning: array_keys() expects parameter 1 to be array, null given in drupal_schema_fields_sql() (line 6735 of /var/www/drupal-dev2/includes/common.inc).