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');
}
function isbn_uninstall() {
drupal_uninstall_schema('isbn');
}