You are here

regcode_mailer.install in Registration codes 6.2

Install, uninstall and scheme functions for the regcode_mailer module.

File

regcode_mailer/regcode_mailer.install
View source
<?php

/**
 * @file
 * Install, uninstall and scheme functions for the regcode_mailer module.
 */

/**
 * Implementation of hook_uninstall().
 */
function regcode_mailer_uninstall() {
  drupal_uninstall_schema('regcode_mailer');
}

/**
 * Implementation of hook_install().
 */
function regcode_mailer_install() {
  drupal_install_schema('regcode_mailer');
}

/**
 * Implementation of hook_schema().
 */
function regcode_mailer_schema() {
  $schema['regcode_mailer'] = array(
    'description' => t('Registration code mailer information'),
    'fields' => array(
      'id' => array(
        'description' => t('Mail ID'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'rid' => array(
        'description' => t('Regcode ID'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'disp-width' => '11',
      ),
      'mailed' => array(
        'description' => t('The date code was mailed'),
        'type' => 'datetime',
        'not null' => FALSE,
      ),
      'recipient' => array(
        'description' => t('The address the code was mailed to'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
regcode_mailer_install Implementation of hook_install().
regcode_mailer_schema Implementation of hook_schema().
regcode_mailer_uninstall Implementation of hook_uninstall().