Some months ago, I noticed Arnab's blog note about the importance of the sequence
table, albeit in a multisite context.
This table also needs special care when copying a drupal site: logically enough, its rows contain the name of the prefixed tables for which a sequence is maintained. For instance, this means that, if you defined the source site as using, say, oldsite_
as a prefix, the name field on the row for the next nid will look like: oldsite_node_nid
.
Now, supposing the target site uses, say, newsite_
as a prefix, uploading the old database will not only require changing the names of the tables in the SQL commands, but also the value of each entry being inserted in the sequence
table, so that, for instance, the name field on the row for the next turns to newsite_node_nid
, otherwise the sequence table will restart sequencing from 1 for each series instead of taking over from where the previous site had been left.
Details on moving installs
I wrote an article on moving a Drupal install from a prefixed database to a non-prefixed one last year that covers some of these details.
importexportapi
If you use the Import / Export API module to copy a site's data, then it will handle any updates that need to be made to the 'sequences' table. This would be much easier than copying raw database rows manually.