I'm confused. The documentation of API funtion db_next_id() (http://drupaldocs.org/api/head/function/db_next_id) states:

For compatibility reasons, Drupal does not use auto-numbered fields in its database tables. Instead, this function is used to return a new unique ID of the type requested. If necessary, a new sequence with the given name will be created.

However there at least some tables (terms_.....) that have auto incrementing id fields. What's the catch here and/or what is the preferred way?

Comments

Zen’s picture

For your own modules, auto_increment is fine. From what I can tell, core will most likely also switch to auto_increment in a future version.

-K

pjdevries’s picture

Thanx!