You are here

apachesolr_exclude_node.install in Apache Solr Exclude Node 7

Same filename and directory in other branches
  1. 6 apachesolr_exclude_node.install

Install file for the Apache Solr Exclude Node module.

File

apachesolr_exclude_node.install
View 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',
      ),
    ),
  );
}

/**
 * Implements hook_unnstall().
 */
function apachesolr_exclude_node_uninstall() {

  // Deleting variables.
  db_query("DELETE FROM {variable} WHERE name LIKE 'apachesolr_exclude_node_%'");
}

Functions

Namesort descending Description
apachesolr_exclude_node_schema Implements hook_schema().
apachesolr_exclude_node_uninstall Implements hook_unnstall().