apachesolr_user.install in Apachesolr User 6
File
apachesolr_user.install
View source
<?php
function apachesolr_user_install() {
drupal_install_schema('apachesolr_user');
drupal_set_message(t('Apache Solr User Search is enabled.'));
}
function apachesolr_user_enable() {
apachesolr_user_rebuild_index_table();
}
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;
}
function apachesolr_user_uninstall() {
drupal_uninstall_schema('apachesolr_user');
}