드루팔에서 블로그를 포럼 글로 바꾸는 과정에서, 다음과 같이 DB를 건드릴 일이 있습니다.
일단 과정은 알아낸 것 같은데, 이를 sql로 표현하는 것이 어렵군요.
주어지는 값 : category# / forum#
0. find target
select n.nid,vid from node as n,term_node as t where n.nid=t.nid and t.tid={category#}
for each result,
1. change type
update node set type='forum' where nid={current nid}