data_taxonomy.install in Data 6
Install hooks for Data Taxonomy module.
File
data_taxonomy/data_taxonomy.installView source
<?php
/**
* @file
* Install hooks for Data Taxonomy module.
*/
/**
* Implementation of hook_schema().
*/
function data_taxonomy_schema() {
$schema = array();
$schema['data_taxonomy'] = array(
'description' => 'Relate data records to taxonomy',
'fields' => array(
'tid' => array(
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
),
'data_table_name' => array(
'type' => 'varchar',
'size' => 'normal',
'length' => 64,
'not null' => TRUE,
),
'id' => array(
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'indexes' => array(
'tid' => array(
'tid',
),
'data_table_name' => array(
'data_table_name',
),
'id' => array(
'id',
),
'name_id' => array(
'data_table_name',
'id',
),
),
'primary key' => array(
'tid',
'data_table_name',
'id',
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function data_taxonomy_install() {
drupal_install_schema('data_taxonomy');
}
/**
* Implementation of hook_uninstall().
*/
function data_taxonomy_uninstall() {
drupal_uninstall_schema('data_taxonomy');
}
Functions
Name | Description |
---|---|
data_taxonomy_install | Implementation of hook_install(). |
data_taxonomy_schema | Implementation of hook_schema(). |
data_taxonomy_uninstall | Implementation of hook_uninstall(). |