You are here

apachesolr_nan.install in Apache Solr Not-A-Node 7

Same filename and directory in other branches
  1. 7.2 apachesolr_nan.install

Defines tables for non-node search data and cleanup functions.

File

apachesolr_nan.install
View source
<?php

/**
 * @file
 * Defines tables for non-node search data and cleanup functions.
 */

/**
 * Implements hook_schema().
 */
function apachesolr_nan_schema() {
  $schema['apachesolr_nan_index_paths'] = array(
    'description' => t('Maps paths to index to .'),
    'fields' => array(
      'id' => array(
        'description' => t('Fake Node Id'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'path' => array(
        'description' => t('The path to index.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'description' => array(
        'description' => t('The description to show users for search results.'),
        'type' => 'text',
        'not null' => FALSE,
      ),
      'title' => array(
        'description' => t('The title that will be added to the index.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'frequency' => array(
        'description' => t('The time between indexing in seconds.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'last_indexed' => array(
        'description' => t('The unix timestamp of the last index run.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'path' => array(
        'path',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
apachesolr_nan_schema Implements hook_schema().