I am running two sites in separate servers:
- the testing site
- the production site
as recommended in the good practices section.

While I am adding new content to the testing site, the internet users keep adding content to the production site at the same exact time. The problem arises when it is time to merge the two databases. There are rows in the two node tables which are showing the same identifier (nid column)! That makes impossible to merge the rows in a straighforward way.

Has anyone developed the appropiate SQL scripts to achieve that?

Best regards

Comments

davidjava’s picture

Hello,

Finally, I decided to develop the script myself. Please give it a try and tell me your comments. I executed it against my personal web site for several times and it seems to be running fine.

http://www.geocities.com/mergedb

I would have preferred to upload the material at the drupal site, but the CVS administrator cannot find the right section. It is not a module, it is not a php snippet, it is not a sql snippet, ... what is it? :(

When anyone should eventually detect a bug, I will try to fix ASAP and place a new package for download.

Regards.

sinasalek’s picture

Thanks for sharing it david.

sina.salek.ws
Feel freedom with open source softwares

sina.salek.ws, Software Manager & Lead developer
Feel freedom with open source softwares

pmichelazzo’s picture

Hi people,

Someone can tell me where is the script? The geocities has gone.

Thanks

davidjava’s picture

You should also read these recent threads:

http://drupal.org/node/232151
http://drupal.org/node/120617

It is very disappointing when several developers make efforts working on the same issue... I hope we can "merge" our ideas into a great common project.

ryanhunt’s picture

Has this methodology been attempted by anyone to solve the problem of merging a test/stage server with a production server for the Drupal 6.x schema?

ceardach’s picture

I am researching options now for upgrading dbscripts, however... this looks like it's going to be difficult due to sequences.

My previous method involved assigning ID blocks for development and production, however, table-based auto_increment sequencing appears to make this impossible. No matter what I specify the next auto_increment should be, it will automatically recalculate based on the highest ID currently in the table.

I am considering, but wary of, reassigning IDs across the database that were created in development to now be ordered sequentially after the production's values. The reason being that you can refer to a node ID as a value that is not a table column, for example, inter-linking content.

I'm going to keep researching, though.

ceardach’s picture

I'm happy to say that I got it working :) dbscripts is now updated for Drupal 6.