apachesolr_exclude_node.install in Apache Solr Exclude Node 6
Same filename and directory in other branches
Install file for the Apache Solr Exclude Node module.
File
apachesolr_exclude_node.installView source
<?php
/**
* @file
* Install file for the Apache Solr Exclude Node module.
*/
/**
* Implements hook_schema().
*/
function apachesolr_exclude_node_schema() {
return array(
'apachesolr_exclude_node' => array(
'description' => 'The main table holding info about excluded nodes.',
'fields' => array(
'nid' => array(
'description' => 'The foreign key to node.nid',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The foreign key to node.vid',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'exclude' => array(
'description' => 'Exclude status. 0 = no, 1 = yes',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'nid' => array(
'nid',
),
),
'primary key' => array(
'vid',
),
),
);
}
/**
* Implementation of hook_install().
*/
function apachesolr_exclude_node_install() {
drupal_install_schema('apachesolr_exclude_node');
}
/**
* Implementation of hook_uninstall().
*/
function apachesolr_exclude_node_uninstall() {
drupal_uninstall_schema('apachesolr_exclude_node');
// Deleting variables
db_query("DELETE FROM {variable} WHERE name LIKE 'apachesolr_exclude_node_%'");
}
Functions
Name![]() |
Description |
---|---|
apachesolr_exclude_node_install | Implementation of hook_install(). |
apachesolr_exclude_node_schema | Implements hook_schema(). |
apachesolr_exclude_node_uninstall | Implementation of hook_uninstall(). |