summaryrefslogtreecommitdiffstats
path: root/views_natural_sort.install
blob: a113ab09b66825902739da3f207c45c7913a9317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
// $Id$
/**
 * @file
 *
 */


/**
 * Implementation of hook_schema().
 */
function views_natural_sort_schema() {

  $schema['views_natural_sort'] = array(
    'description' => t('Compressed titles for natural sorting.'),
    'fields' => array(
      'eid' => array(
        'description' => t('Entity id'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'entity_type' => array(
        'description' => t('Entity Type'),
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => 'node',
      ),
      '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' => '',
      ),
      'delta' => array(
        'description' => t('The sequence number for this data item, used for multi-value fields'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'content' => array(
        'description' => t('Filtered content used for sorting.'),
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array('eid', 'entity_type', 'field', 'delta'),
  );

  return $schema;
}

/**
 * Implements hook_install().
 */
function views_natural_sort_install() {
}

/**
 * Implements hook_uninstall().
 */
function views_natural_sort_uninstall() {
}