I would not recommend to change that term the way you described it in your question. Instead I'd use an alternative approach to achieve a similar result (in the order specified), which is further detailed below.
Step 1 - Start using the new term in future node updates
Create a new taxonomy term field, so that "from now on" any future node updates (or new nodes being created) will use that new field. I assume these terms are used for nodes (if you use it for some other entity type, like users, etc), the same approach can be used for those entities also.
Use the Rules module to create a rule like so:
- Rules event:
before saving content
.
- Rules conditions:
entity has field
, with field = the old field.
- AND NOT (
entity has field
, with field = the new field).
- Rules Action:
set Drupal message
, which contains some instructions that the old field must be blanked out, and the new field should contain the appropriate value(s).
Step 2 - Use Rules to speed up the process
Obviously, the approach in Step 1 will take "some" time if this has to be done manually, 1 node at a time. But using Views (to build a list of similar nodes to be updated) and VBO (to mass update such lists) you might (should!) be able to speed up this process quite a bit.
Especially if you'd use Rules to create a custom bulk operation for such VBO view, as explained in the answer to "How to use Rules to create a custom bulk operation for a VBO view?". Here is a prototype of a Rules Component that should help to implement such custom bulk operation (in Rules Export format):
{ "rules_replace_a_term_field_by_another_term_field" : {
"LABEL" : "Replace a term field by another term field",
"PLUGIN" : "rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"USES VARIABLES" : { "node" : { "label" : "Node", "type" : "node" } },
"IF" : [
{ "entity_has_field" : { "entity" : [ "node" ], "field" : "field_sample_tags" } },
{ "entity_has_field" : { "entity" : [ "node" ], "field" : "field_demo_tags" } },
{ "data_is" : { "data" : [ "node:field-demo-tags" ], "value" : "1" } }
],
"DO" : [
{ "data_set" : { "data" : [ "node:field-sample-tags" ], "value" : "31" } },
{ "drupal_message" : { "message" : "Term updated in node with id = [node:nid]" } }
]
}
}
Some more details to explain the above prototype:
If you want, adapt the machine names of the field names in the above prototype, and the used term IDs. Then import it in your own site (using the Rules UI), and QA-test it using the "execute" link to the right of the imported Rules Component (and enter some node id to test it, after you switch to "direct input mode" to be able to specify a node id). If during your testing you don't get such a Term updated in node ...
message, it must be because the node you selected did not use the term value specified in your rules Condition.
Step 3 - Use VBO as the finishing touch
After you're finished QA-testing this Rules Component from Step 2, create a VBO-view of nodes to be processed, in which you refer to the Rules prototype above (or a variation of it to fit your needs).
Benefit of this approach
Using this approach, you minimize the risk to introduce data inconsistencies (as compared to updating the database directly), with zero custom code involved (you'd only use the Views UI and Rules UI).