Often Drupal developers are in a fix when it comes to synchronizing their development, staging, and live (production) sites' databases. Migraine, a python script, comes to the aid of all Drupal developers for this purpose. This small script allows you to maintain separate test and production versions of your Drupal site. After you've made configuration changes on the test site, this script can migrate them to the production site for you.
Andrew Shearer developed this Python script and we have found it very useful to synchronize databases of development, staging and production sites. Subversion (SVN) is helpful in synchronizing files but cannot help in terms of synchronize databases, given that Drupal stores a lot of its configurations in databases.
The original script is available at the following link:
http://www.shearersoftware.com/software/server-administration/migraine/
but the script is only available for Drupal 5.
Drupal 6 has changed its implementation of nodes, users, and comments -- no more sequences stored in "variable" table. The script is tweaked a bit to incorporate the changes made in Drupal 6. The configuration is not plug and play but needs an understanding of the Drupal database which is fairly simple. To get an understanding of the Migraine script - "what and why" - take a look at a Drupal Camp Presentation by Blisstering Solutions (http://www.slideshare.net/drupalindia/migraine-drupal-syncing-your-stagi...).
Attached is the python script along with the configuration file. In case, customizations are required, let us know.
| Attachment | Size |
|---|---|
| migraine.zip | 16.05 KB |