Hi dev, into file date_api.install is not aviable function schema, but this module alterate table {users}, please fix it with this code:

function date_api_schema() {
  $tables['users'] = drupal_get_schema('users');
  
  $tables['users']['fields']['timezone_name'] = array(
    'type' => 'varchar', 
    'length' => 50, 
    'not null' => TRUE, 
    'default' => ''
  );
  
  return $tables;
}

Comments

drewish’s picture

Status: Reviewed & tested by the community » Needs work

i don't think this is the correct way to do this, hook_schema_alter seems more correct way otherwise when un-installing the date module the users table would be deleted. but i'm not even certain that we should be adding a column. if the $user object has extra fields that don't match a db column they're serialized and saved into the data field.

karens’s picture

Status: Needs work » Fixed

The Date API already implements hook_schema_alter for the users table on line 1711. Both Event and Date add timezone info columns to the users table and have for several versions and I'm not aware that it has ever caused any problems. Having it serialized and stored in the data field is not sufficient because we need to be able to query on that value.

drewish’s picture

i should have mentioned that my comments were made with out looking at the code ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.