As I recently mentioned, the .install file of my pending (and very customized) module creates a new vocabulary, to accomodate the new nodes being imported via web services. Upon creation of the vocabulary, I need to know the vid, so I can then populate the new vocabulary with terms.
The question is: what's the proper way to do this. After some research, I went with this:
taxonomy_save_vocabulary($vocabulary);
$vid = db_next_id('{vocabulary}_vid')-1;But it really doesn't sit well with me. I realize that, in order to stay database-agnostic, Drupal uses 'tricks' like the sequence table. But still ... Am I missing something?