When you develop a lot of sites you need to get a good workflow in. There are the basics of course:
- Only work on code in a local environment. (Seriously - during my time as freelancer I saw big corporations do their work in live environments. Not only does it suck bigtime if you screw up, but it also makes work insanely slow. Crazy.)
- Always version control.
- Coordinate with your fellow developers.
I really dig handling deployment and version control with GIT - but that only applies to files. So what do you do with databases, especially if you're multiple people working on one project? The best I got so far is a workflow that goes a little something like this:
- Set up centralized staging server
- Make database alterations (like Drupal configurations) there
- Fetch database to your local machine
Back at Good Old we had a really handy script written by Hugo Wetterberg, awesomeguy extraordinaire, that fetched the database from a remote server and imported it into your local environment automagically. I really missed this when I left the company, so I learnt some basic bash scripting that does the very same thing. As long as you've got SSH access to a server (and that SSH user has access to mysql) you can use this script to download and automatically import a database:
Mind you, I only know rudimentary bash stuff - this could probably be way more elegant. For instance, it opens a new connection every time a new command needs to be given to the server - prompting you for your SSH password every time if you don't use SSH keys. But it works, and thus I'm happy.