开发者

Working with version control on a Drupal/CMS project

I was wondering how teams that develop sites using Drupal (or any other CMS) integrate version control, subversion, git or similar, into their workflow. You'd obviously want your custom code and theme files under version control but when you use a CMS such as Drupal a lot of the work consists of configuring modules and settings all of which is stored in the database.

So when you are a team of developers, how do you collaborate on a project like this? Dumping the database into a file and putting that 开发者_高级运维file under version control might work I guess, but when the site is live the client is constantly adding content which makes syncing a bit problematic.

I'd love to know how others are doing this.


You are correct that this is an issue for Drupal--version control works fine until you turn the site over to your client or open it up to users.

Your question seems like a more specific version of this one, which touched on version control in the Drupal workflow. You may find some answers there that help.

For some projects, I have exported all of the views to code, using that feature of the Views module, and I have one project where all of the blocks have been exported, as well. (Although that was a development exercise and not a customary thing to do with blocks.)

Take a look at the work that Development Seed is doing to work around this problem. They are leading the development of the Context, Features, and Spaces modules that work together to store configuration data in modules (outside of the DB) so that it can be versioned with the code.

There is a Drupal group called Packaging & Deployment for discussing the various solutions that are being developed for this issue.


Right now there are a lot of efforts towards creating something that will handle the dev -> production difficulties with drupal in relation to the database. Features, that flaminglogos mentioned is one, but I feel that is more focused on creating stand alone projects, ie ones that would be installed on many sites.

For simple maintaining you dev and prod databases I'd take a look at http://drupal.org/project/deploy and http://drupal.org/project/dbscripts. They support syncing and merging db side drupal config data.

I can't guarantee they are ready for prime time though...


There is a lot of effort of shipping the next drupal version with configuration in code. That's is the key to have it in a version system.

For now you can use the features module, with that you can export things like content types, views, etc. to code, and then compare, version and revert it as you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜