I'm in the process of developing a new Drupal-powered website with two other developers and have struck a problem I'm hoping somebody has thought of / conquered before.
The problem
Normally, multi-developer website projects aren't an issue with CVS / Subversion and a staging server for your efforts. However Drupal is special in that much of the development isn't in writing PHP code per se, but in configuring an out-of-the-box install (+ some modules) from within the Adminsitration section of Drupal. You know, things like adding in content types, custom Flexinodes, taxonomies, etc.
Since all this configuration can quickly become complex and resides all within the Drupal database, I'm struggling with a way of managing 3 developers all working on configuring various components of the same Drupal website.
An example
To take one example, what if two developers want to test and configure a new taxonomy structure / term on their own sandbox versions of the site? Once their happy with the way it works, how do they then merge it back in to the main site? What happens if they two taxonomies conflict? What if you want to roll back some congiuration changes?
In a nutshell
In other words, the ease with which CVS can handle mutli-developer projects--with code being checked out, branched, merged and updated--is absent from the complex DB-based configuration that is required for a highly-customised Drupal website.
How does everybody else handle this?
Comments
You can version control your
You can version control your drupal site- I don't know if that helps. Here is a link:
http://www.thefilehighclub.com/version-control
How I Do It
I too had this problem and found the following points to be very helpful:
Use {module}_update_{x} in {module}.install
Whenever you make a database change, add in to your .install file for a module. both in the _install hook and in a new module_update_x hook.
Require a shared settings.php for each sandbox
Each sandbox probably has its own URL such as jakeg.example.com etc. Allow the possiblity of each one using its own database etc depending on what the developer is currently up to. But in each individual settings.php just include the $db_url and an other custom variables your site my use. Then...
Override the 'variable' database table
For each sandbox, require a common file in its sites/sandbox/settings.php file:
In your settings.php file for your site, define any variable which is in the 'variable' database table in a $conf array, e.g.
Note that doing this will disable your ability to adjust these variables using the admin/settings page form etc (that is, only the variables you override here), but that's probably what you want.
Then of course, make sure your common settings.php file is in your CVS/SVN, and hey presto, version control of your site settings.
Jake
---
School and university yearbooks and Drupal web services, London
Elaborating my first point
Elaborating on my first point, say you add a new database field and then you want to delete it for all developers:
... for my site, I use these for all database updates (the example above is my 26th update in this way). I don't use PHPMyAdmin any more for updates for this reason.
Ensure all developers use update.php to update their sandboxes.
Jake
---
School and university yearbooks and Drupal web services, London