You are here

function taxonomy_machine_name_install in Taxonomy Machine Name 7

Same name and namespace in other branches
  1. 8 taxonomy_machine_name.install \taxonomy_machine_name_install()

Implements hook_install().

File

./taxonomy_machine_name.install, line 11
Taxonomy Machine Name Install File.

Code

function taxonomy_machine_name_install() {
  $settings = array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => FALSE,
    'default' => NULL,
    'description' => 'The taxonomy term machine name.',
  );
  db_add_field('taxonomy_term_data', 'machine_name', $settings);
  db_add_unique_key('taxonomy_term_data', 'vid_machine_name', array(
    'vid',
    'machine_name',
  ));
  db_add_index('taxonomy_term_data', 'machine_name', array(
    'machine_name',
  ));

  // Disable default migrate taxonomy handler.
  taxonomy_machine_name_update_7001();
}