Thanks to Noosphere Networks, I’m releasing a script that helps developers of web sites built with Drupal to maintain separate development/test and production sites, pushing changes from test to production as needed. This is challenging with a stock Drupal installation. Changes to PHP code are no problem, because it lives in the filesystem and can be copied or committed to a revision-control system like Subversion. But a lot of Drupal’s configuration work take place within its web administration interface and is saved to the database, where production content such as user accounts and comments is also stored.
The desire to do this frequently comes up on Drupal’s forums, and the typical workarounds have some large drawbacks (involving some combination of extended downtime on the production site, duplication of work, and the loss of content, comments, and user account changes made in the interim).
This small script attempts to solve that by categorizing Drupal’s tables and moving only the right ones at the right time, while handling details such as merging sequence numbers. It also dumps Drupal’s databases to disk in a format that works well for checkin to a revision control system.
This is free software, licensed under the GPL.
There’s a more ambitious project called AutoPilot that aims to do this and more in the future, but its ability to merge test sites into production without losing production content isn’t available yet, and I needed something now.
Be warned, though, that this is an alpha release, intended for those with familiarity with MySQL and Drupal’s table layout. If you have CCK fields, there may be some manual work required when you modify your field layout because CCK tends to change your database schema, and Migraine does not currently attempt to automate all of those changes. It will detect them and warn of the problem, however.
See more information at the Migraine project page.
March 19th, 2008 at 10:10 AM
This is exactly what we were looking for!
But how do we contribute back with categorized “unknown tables”? And eventually find other contributed categorizations?
I’ve got the following reported as unknown currently (Mostly from E-Commerce, OpenResort and i18n):
accommodation_availability
accommodation_bed_types
accommodation_inventory
accommodation_price
accommodation_rooms
accommodation_types
accommodation_units
business
business_ammenities
business_ammenities_node
business_ammenities_ptype
business_hotel
business_section_node_types
business_taxes
business_terms
business_terms_relation
business_terms_sections
client
client_system
content_type_business
content_type_product
content_type_recipe
content_type_story
content_type_unit
ec_address
ec_anon
ec_attribute
ec_cart
ec_coupon
ec_credit_card
ec_mail
ec_paypal
ec_product
ec_product_attribute
ec_product_base
ec_product_file
ec_product_parcel
ec_product_tangible
ec_recurring_expiration
ec_recurring_product
ec_recurring_reminder
ec_recurring_schedule
ec_region
ec_region_configuration
ec_renewal
ec_role_discount
ec_roles
ec_subproduct_pricing
ec_tax
ec_tmp
ec_transaction
ec_transaction_address
ec_transaction_coupon
ec_transaction_misc
ec_transaction_product
ec_useracc
ec_useracc_confirm
ec_variation
fckeditor_role
fckeditor_settings
i18n_blocks
i18n_blocks_i18n
i18n_node
i18n_profile_fields
i18n_variable
location_fax
location_phone
menu_per_role
recipe
recipe_ingredient
recipe_node_ingredient
recipe_unit
taxonomy_context_term
taxonomy_context_vocabulary
I’ll attempt to categorize these in the next few days and report back my suggestions for categorization.
A welcomed feature would be to be able to override the tables’ categorizations in the ini-file and let the categorization in migraine.py stand as defaults only. For instance, not everyone categorizes “menu” as configuration since it may be constantly manipulated by designated moderators on the productions site etc.
Also, this would allow easy testing of unknown tables categorization locally before attempting to commit that to your subversion repository.
June 29th, 2008 at 10:25 PM
It’s very information and useful for migraine management.
To complete migraine treatmeent,
you might need to have two free bonuses of ebooks: Healing Food and Pennasia Sleep Therapy (Pleet).
Visit at PennasiaNormalization.com for further.
I also get two free bonuses of ebooks when I enter forum. Have a nice day!