tags:

views:

61

answers:

4

We are a team of many developers working on a website that uses both Joomla and custom PHP scripts. The problem is that there are multiple developers working on various features which need to update information in Joomla (adding modules, changing existing ones or changing settings) and when one developer changes something, he usually makes the change locally first and then does the same thing (hopefully) on the production server. Not only that this is very error-prone, but the developers often forget to tell other developers about the changes. The custom PHP scripts are easily shared between developers, but the changes in Joomla are often forgotten and they lead to serious conflicts when a developer tries to replicate his local changes in production.

I have thought about placing Joomla in a Mercurial repository, but how could we distribute the changes in the database between the development, the testing and the production machines?

+3  A: 

We run all of our Joomla sites over subversion, checking them out as required. We just branch whenever we need to make major amends to a project.

In general, we run a single test database which is shared amongst everyone to ensure we have consistent data but you could easily run local DB's as well.

Jeepstone
A: 

If you build everything as extensions (modules, components, and plugins), they should include any database changes required. I would set it up so each developer is working off their own local database. If you need test data loaded, I would just create MySQL scripts that can be run after you install all the extensions. Since all of this can be checked into a repo, you should be good on everyone sharing code.

Using PHP, you should be able to write up a quick script that will start with an empty server, install Joomla!, install all your extensions, and then dump in any test data. Having this will also be good for developers to get back to a "clean" state. I would encourage developers to reset back to the golden state before they start any new work.

Another idea would be to use mysqldump to dump all of your tables. If a user makes a database change on their local machine, they also need to dump out the change and check it in.

Will Mavis
A: 

We use SVN on our server to manage these types of issues. If you are going to do any productive development with a team of people you have to use a revision control system. There are a number out there, have a google for svn, cvs, git, those are some of the most commonly accepted version control systems. It might take some time to setup initially but you will reap the rewards from it!

Hope that helps! Cheers

Martin
@Martin - The main problem is that database and the fact that we can't control what changes are made to the database when we install or remove a 3rd party Joomla component.
Tom
You could checkin sql files that all users would have access to. You could store in these, either update data routines or add columns etc as you wish. Perhaps a sql file per table. This way you can see what has changed from the initial database setup and you can apply these changes to new database setups when necessary.
Martin
+1  A: 

We use SVN for all our customers with separate databases. When installing a new extension the database changes. With a diff of the databasedump before and the databasedump after installation of the extension we know what the differences are.

Also a very nice idea! I wish there was a way to split answers...
Tom