Hello,

There's a schema mismatch in your .install

column category - difference on: not null
declared: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'default' => '')
actual: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '')

Cheers,

Comments

aidanlis’s picture

Also from the schema module:
profile_role.category is part of the primary key but is not specified to be 'not null'.

not_Dries_Buytaert’s picture

Same here, when following the path 'admin/build/schema/compare' after the module schema-6.x-1.7 (http://drupal.org/project/schema) is installed and enabled. This quote from the file 'profile_role.install' reveals that the 'not null' attribute of the 'category' field in the 'profile_role' table is set to FALSE in the database schema definition:

/**
 * Implementation of hook_schema().
 */
function profile_role_schema() {
  $schema = array();
  $schema['profile_role'] = array(
    'description' => t('Relate profile categories to the roles.'),
    'fields' => array(
      'rid' => array(
        'description' => t('Role ID.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0
      ),
      'category' => array(
        'description' => t('The category that relates to the role.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => ''
      )
    ),
    'primary key' => array('rid', 'category')
  );
  return $schema;
}

However, it is set to TRUE in the live/ actual database scheme. I think (but am unsure) that the definition needs correcting, because the category of the profile role may be empty.

achton’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

Still seeing this in current dev version, is that right?

daniel wentsch’s picture

Subscribing