You are here

function views_url_alias_node_schema in Views URL alias 6

Same name and namespace in other branches
  1. 8 views_url_alias_node.install \views_url_alias_node_schema()
  2. 7 views_url_alias_node.install \views_url_alias_node_schema()

Implementation of hook_schema().

File

./views_url_alias_node.install, line 37
Installation information for the Views URL alias (node) module.

Code

function views_url_alias_node_schema() {
  return array(
    'views_url_alias_node' => array(
      'description' => t("A second url alias table for only node aliases used by views."),
      'fields' => array(
        'nid' => array(
          'description' => 'The related {node}.nid for the url alias.',
          'type' => 'int',
          'not null' => TRUE,
          'default' => 0,
        ),
        'dst' => array(
          'description' => 'The alias for this path; e.g. title-of-the-story.',
          'type' => 'varchar',
          'length' => 255,
          // set to 255 (instead of 128) to accommodate longer urls.
          'not null' => TRUE,
          'default' => '',
        ),
      ),
      'primary key' => array(
        'nid',
      ),
      'unique keys' => array(
        'dst_nid' => array(
          'dst',
          'nid',
        ),
      ),
      'indexes' => array(
        'nid_dst' => array(
          'nid',
          'dst',
        ),
      ),
    ),
  );
}