You are here

function apachesolr_user_schema in Apachesolr User 6

Same name and namespace in other branches
  1. 7 apachesolr_user.install \apachesolr_user_schema()

Implementation of hook_schema().

File

./apachesolr_user.install, line 23

Code

function apachesolr_user_schema() {
  $schema['apachesolr_search_user'] = array(
    'description' => t('Stores a record of when a user property changed to determine if it needs indexing by Solr.'),
    'fields' => array(
      'uid' => array(
        'description' => t('The primary identifier for a user.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'status' => array(
        'description' => t('Boolean indicating whether the user is visible to non-administrators.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'changed' => array(
        'description' => t('The Unix timestamp when a user property was changed.'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'changed' => array(
        'changed',
        'status',
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  );
  return $schema;
}