diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.install')
-rw-r--r-- | modules/taxonomy/taxonomy.install | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index 96499e909..c16bdf1a2 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -159,6 +159,9 @@ function taxonomy_schema() { 'indexes' => array( 'list' => array('weight', 'name'), ), + 'unique keys' => array( + 'machine_name' => array('machine_name'), + ), ); $schema['taxonomy_index'] = array( @@ -256,6 +259,7 @@ function taxonomy_update_7002() { ); db_add_field('taxonomy_vocabulary', 'machine_name', $field); + db_add_unique_key('taxonomy_vocabulary', 'machine_name', array('machine_name')); foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) { $machine_name = 'vocabulary_' . $vid; |