Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pjdevries on
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
For your own modules,
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
Thanx!
Thanx!