You are here

regcode_og.install in Registration codes 6

File

regcode_og/regcode_og.install
View source
<?php

/**
 * Implementation of hook_uninstall()
 */
function regcode_og_uninstall() {
  drupal_uninstall_schema('regcode_og');
}

/**
 * Implementation of hook_install()
 */
function regcode_og_install() {
  drupal_install_schema('regcode_og');
}

/**
 * Implementation of hook_schema()
 */
function regcode_og_schema() {
  $schema['regcode_og'] = array(
    'description' => t('Registration code organic group assignment information'),
    'fields' => array(
      'id' => array(
        'description' => t('Rule ID'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'category' => array(
        'description' => t('Category of regcode used'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'og' => array(
        'description' => t('Organic Group ID'),
        'type' => 'int',
        'unsigned' => TRUE,
        'disp-width' => '11',
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
regcode_og_install Implementation of hook_install()
regcode_og_schema Implementation of hook_schema()
regcode_og_uninstall Implementation of hook_uninstall()