You are here

restrict_abusive_words.install in Restrict Abusive Words 7

Same filename and directory in other branches
  1. 8 restrict_abusive_words.install
  2. 7.2 restrict_abusive_words.install

Module install and update functions for the Restrict Abusive Words module.

File

restrict_abusive_words.install
View source
<?php

/**
 * @file
 * Module install and update functions for the Restrict Abusive Words module.
 */

/**
 * Implements hook_schema().
 */
function restrict_abusive_words_schema() {
  $schema = array();
  $schema['restrict_abusive_words'] = array(
    'fields' => array(
      'id' => array(
        'description' => 'The ID of the abusive word.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'words' => array(
        'description' => 'Abusive word.',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

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

  // Delete all variables related to this module.
  variable_del('restrict_abusive_words_actions');
  variable_del('restrict_abusive_words_user_roles');
  variable_del('restrict_abusive_words_disable_user_roles');
  variable_del('restrict_abusive_words_general_form');
  variable_del('restrict_abusive_words_entity_node');
  variable_del('restrict_abusive_words_entity_comment');
}