You are here

function simple_sitemap_views_schema in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 modules/simple_sitemap_views/simple_sitemap_views.install \simple_sitemap_views_schema()

Implements hook_schema().

File

modules/simple_sitemap_views/simple_sitemap_views.install, line 27
Install and uninstall hooks for the simple_sitemap_views module.

Code

function simple_sitemap_views_schema() {
  $schema['simple_sitemap_views'] = [
    'description' => 'Index of argument values for view pages.',
    'fields' => [
      'id' => [
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique ID for argument values.',
      ],
      'view_id' => [
        'type' => 'varchar_ascii',
        'not null' => TRUE,
        'default' => '',
        'length' => 128,
        'description' => 'The ID of the view.',
      ],
      'display_id' => [
        'type' => 'varchar_ascii',
        'not null' => TRUE,
        'default' => '',
        'length' => 128,
        'description' => 'The ID of the view display.',
      ],
      'arguments_ids' => [
        'type' => 'varchar',
        'not null' => TRUE,
        'default' => '',
        'length' => 1024,
        'description' => 'A string representation of the set of argument identifiers.',
      ],
      'arguments_values' => [
        'type' => 'varchar',
        'not null' => TRUE,
        'default' => '',
        'length' => 1024,
        'description' => 'A string representation of the set of argument values.',
      ],
    ],
    'primary key' => [
      'id',
    ],
    'indexes' => [
      'arguments_ids' => [
        'view_id',
        'display_id',
        'arguments_ids',
      ],
    ],
  ];
  return $schema;
}