You are here

function views_natural_sort_schema in Views Natural Sort 7.2

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

Implements hook_schema().

File

./views_natural_sort.install, line 11
The Views Natural Sort install file.

Code

function views_natural_sort_schema() {

  // Contains relations between two users.
  $schema['views_natural_sort'] = array(
    'description' => 'Compressed titles for natural sorting.',
    'fields' => array(
      'eid' => array(
        'description' => 'Entity id',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'entity_type' => array(
        'description' => 'Entity Type',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => 'node',
      ),
      'field' => array(
        'description' => 'The field name. This will be title or some cck text field, etc.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'delta' => array(
        'description' => 'The sequence number for this data item, used for multi-value fields',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'content' => array(
        'description' => 'Filtered content used for sorting.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'eid',
      'entity_type',
      'field',
      'delta',
    ),
  );
  return $schema;
}