View source
<?php
function fe_taxonomy_install() {
drupal_install_schema('fe_taxonomy');
$weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'"));
db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_taxonomy'", $weight + 1);
}
function fe_taxonomy_update_6011() {
$weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'"));
db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_taxonomy'", $weight + 1);
}
function fe_taxonomy_uninstall() {
drupal_uninstall_schema('fe_taxonomy');
}
function fe_taxonomy_schema() {
$schema['fe_taxonomy_vocabulary'] = array(
'description' => '',
'export' => array(
'key' => 'machine_name',
'can disable' => FALSE,
),
'fields' => array(
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'no export' => TRUE,
),
'machine_name' => array(
'description' => 'machine_name',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'machine_name' => array(
'machine_name',
),
),
'primary key' => array(
'vid',
),
);
return $schema;
}