You are here

function views_natural_sort_schema in Views Natural Sort 6

Same name and namespace in other branches
  1. 8.2 views_natural_sort.install \views_natural_sort_schema()
  2. 7.2 views_natural_sort.install \views_natural_sort_schema()
  3. 7 views_natural_sort.install \views_natural_sort_schema()

Implementation of hook_schema().

File

./views_natural_sort.install, line 11

Code

function views_natural_sort_schema() {

  // Contains relations between two users.
  $schema['views_natural_sort'] = array(
    'description' => t('Compressed titles for natural sorting.'),
    'fields' => array(
      'nid' => array(
        'description' => t('Node id'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'field' => array(
        'description' => t('The field name. This will be title or some cck text field, etc.'),
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'content' => array(
        'description' => t('Filtered content used for sorting.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'key' => array(
      'nid',
      'field',
      'content',
    ),
    'primary key' => array(
      'nid',
      'field',
    ),
  );
  return $schema;
}