name, 'taxonomy_menu') !== FALSE) { variable_del($variable->name); } } // remove table drupal_uninstall_schema('taxonomy_menu'); } /** * Implementation of hook_install(). */ function taxonomy_menu_install() { drupal_install_schema('taxonomy_menu'); } /** * Implementation of hook_schema(). */ function taxonomy_menu_schema() { $schema['taxonomy_menu'] = array( 'description' => 'Links a taxonomy term to a menu item.', 'fields' => array( 'mlid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'The taxonomy terms {menu_link}.mlid.', ), 'tid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'Tid that is linked to the mlid.', ), 'vid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'Vid for the tid.', ), ), 'primary key' => array('mlid', 'tid'), 'indexes' => array( 'vid' => array('vid'), ), ); return $schema; } function taxonomy_menu_update_6200() { $schema['taxonomy_menu'] = array( 'description' => 'Links a taxonomy term to a menu item.', 'fields' => array( 'mlid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'The taxonomy terms {menu_link}.mlid.', ), 'tid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'Tid that is linked to the mlid.', ), 'vid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => 'Vid for the tid.', ), ), 'primary key' => array('mlid', 'tid'), 'indexes' => array( 'vid' => array('vid'), ), ); $ret = array(); db_create_table($ret, 'taxonomy_menu', $schema['taxonomy_menu']); return $ret; }