Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
07ef1595
Commit
07ef1595
authored
Apr 20, 2010
by
webchick
Browse files
#773824
by scor: Fixed taxonomy_update_7002() fails when more than one vocabulary to upgrade.
parent
100ea2d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy/taxonomy.install
View file @
07ef1595
...
...
@@ -259,16 +259,19 @@ 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
;
db_update
(
'taxonomy_vocabulary'
)
->
fields
(
array
(
'machine_name'
=>
'vocabulary_'
.
$vid
))
->
fields
(
array
(
'machine_name'
=>
$machine_name
))
->
condition
(
'vid'
,
$vid
)
->
execute
();
field_attach_create_bundle
(
'taxonomy_term'
,
$machine_name
);
}
// The machine_name unique key can only be added after we ensure the
// machine_name column contains unique values.
db_add_unique_key
(
'taxonomy_vocabulary'
,
'machine_name'
,
array
(
'machine_name'
));
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment