function simple_sitemap_schema in Simple XML sitemap 8.3
Same name and namespace in other branches
- 8.2 simple_sitemap.install \simple_sitemap_schema()
- 4.x simple_sitemap.install \simple_sitemap_schema()
Implements hook_schema().
File
- ./
simple_sitemap.install, line 90 - Module install and update procedures.
Code
function simple_sitemap_schema() {
$schema['simple_sitemap'] = [
'description' => 'Holds XML sitemaps as strings for quick retrieval.',
'fields' => [
'id' => [
'description' => 'Sitemap chunk unique identifier.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
],
'type' => [
'description' => 'Type of sitemap this chunk belongs to.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
],
'delta' => [
'description' => 'Delta of the chunk within the type scope.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
],
'sitemap_string' => [
'description' => 'XML sitemap chunk string.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
],
'sitemap_created' => [
'description' => 'Timestamp of sitemap chunk generation.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
'status' => [
'description' => 'Flag indicating the publishing status of the chunk.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
'link_count' => [
'description' => 'The number of links in the sitemap.',
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'default' => 0,
],
],
'primary key' => [
'id',
],
'indexes' => [
'type_status_delta' => [
'type',
'status',
'delta',
],
],
];
$schema['simple_sitemap_entity_overrides'] = [
'description' => 'Holds sitemap settings overridden by entities.',
'fields' => [
'id' => [
'description' => 'Override unique identifier.',
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
],
'type' => [
'description' => 'Type of sitemap this override belongs to.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
],
'entity_type' => [
'description' => 'Entity type of the overriding entity.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
],
'entity_id' => [
'description' => 'ID of the overriding entity.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
],
'inclusion_settings' => [
'description' => 'Setting for the overriding entity.',
'type' => 'blob',
],
],
'primary key' => [
'id',
],
'indexes' => [
'entity_key' => [
'type',
'entity_type',
'entity_id',
],
],
];
return $schema;
}