google_image_sitemap.install in Google Image Sitemap 6
Same filename and directory in other branches
Install, update and uninstall functions for the google_image_sitemap module
File
google_image_sitemap.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the google_image_sitemap module
*/
/**
* Implements hook_schema().
*/
function google_image_sitemap_schema() {
$schema['google_image_sitemap'] = array(
'description' => 'Stores image sitemap settings.',
'fields' => array(
'sid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique block ID.',
),
'node_type' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
'description' => "The content type for which we want to generate sitemap.",
),
'license' => array(
'type' => 'varchar',
'length' => 100,
'not null' => TRUE,
'default' => '',
'description' => 'license url of sitemap.',
),
'range_start' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'start range of node query',
),
'range_end' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'end range of node query.',
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'timestamp of created request time',
),
'last_updated' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'timestamp of generated request time.',
),
),
'primary key' => array(
'sid',
),
);
return $schema;
}
/**
* Implements hook_install().
*/
function google_image_sitemap_install() {
drupal_install_schema('google_image_sitemap');
}
/**
* Implements hook_uninstall().
*/
function google_image_sitemap_uninstall() {
drupal_uninstall_schema('google_image_sitemap');
}
Functions
Name | Description |
---|---|
google_image_sitemap_install | Implements hook_install(). |
google_image_sitemap_schema | Implements hook_schema(). |
google_image_sitemap_uninstall | Implements hook_uninstall(). |