You are here

isbn.install in ISBN Field 6.0

Same filename and directory in other branches
  1. 8 isbn.install
  2. 7 isbn.install

File

isbn.install
View source
<?php

function isbn_schema() {
  $schema['isbn_node'] = array(
    'description' => t('Table to associate nodes w/normalized ISBNs.'),
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t("The isbn's {node}.nid."),
      ),
      'isbn' => array(
        'description' => t('The ISBN field.'),
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => '',
      ),
      'isbn10' => array(
        'description' => t('The old 10 digit ISBN value.'),
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'nid',
      'isbn',
    ),
  );
  return $schema;
}
function isbn_install() {
  drupal_install_schema('isbn');
}

/**
 * Implementation of hook_uninstall().
 */
function isbn_uninstall() {

  // Remove tables.
  drupal_uninstall_schema('isbn');
}

Functions

Namesort descending Description
isbn_install
isbn_schema
isbn_uninstall Implementation of hook_uninstall().