You are here

node_noindex.install in Node Noindex 7

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

Install, update and uninstall functions for the node_noindex module.

File

node_noindex.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the node_noindex module.
 */

/**
 * Implements hook_install().
 */
function node_noindex_install() {
}

/**
 * Implements hook_uninstall().
 */
function node_noindex_uninstall() {

  // Delete my variables.
  db_query("DELETE FROM {variable} WHERE name LIKE 'node_noindex\\_%'");
}

/**
 * Implements hook_schema().
 */
function node_noindex_schema() {
  $schema['node_noindex'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'noindex' => array(
        'type' => 'int',
        'not null' => FALSE,
        'disp-width' => '1',
      ),
    ),
    'indexes' => array(
      'noindex' => array(
        'noindex',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}

Functions