function simple_sitemap_schema in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 simple_sitemap.install \simple_sitemap_schema()
- 4.x simple_sitemap.install \simple_sitemap_schema()
Implements hook_schema().
File
- ./
simple_sitemap.install, line 72 - 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',
'size' => 'small',
'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',
'default' => 0,
'not null' => TRUE,
'unsigned' => TRUE,
],
],
'primary key' => [
'id',
],
];
$schema['simple_sitemap_entity_overrides'] = [
'description' => 'Holds sitemap settings overridden by entities.',
'fields' => [
'id' => [
'description' => 'Override unique identifier.',
'type' => 'serial',
'unsigned' => TRUE,
'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',
],
];
return $schema;
}