使用 Drupal 的团队 - 提示
我正在和几个朋友一起开发 Drupal 网站。显然我们可以对代码进行版本控制...但是我们如何做才能检查彼此的数据库呢?
我已经设法将所有主题放入文件中(考虑等),但理想情况下我的视图设置、菜单设置也将保持一致...(无论哪种方式都不担心内容,因为我们只是构建框架)
有什么建议吗?
I am working on a Drupal site with a few friends. Obviously we can Version control the code... but what do we do to keep each others databases in check?
I have managed to get all the theming into files (contemplate etc), but ideally my views settings, menu settings would be in line also... (Not worried about Content either way as we're just building the framework)
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将功能与上下文一起使用非常强大。上下文允许您为您的网站创建一个“部分”。最好通过一个例子来说明:
假设我们将“论坛”上下文定义为具有 forums/* url 的任何内容。上下文让我们说:“我想在右侧栏中显示这三个视图,仅当我在“论坛”上下文中时。
现在,使用功能,我们可以创建由上下文定义的“模块”。因此,我们将最终得到一个名为“youSite_forums”的模块,它将包括在论坛上下文中定义的所有视图、块等,它还将确定正确的依赖关系以及上下文中使用的所有内容类型。 控制
对于节点等版本控制内容,您可以使用节点导出,或者仅使用备份和迁移进行数据库转储,但我们从来没有在 SVN 中对每个节点进行版本
。
功能
上下文
备份和迁移
Using Features along with Context is very powerful. Context lets you create a "section" for your site. It's best illustrated through an example:
Lets say we define the "Forum" context as anything with the url of forums/*. Context lets us say: "I want to show these three views in the right side bar, only when I am in the "Forums" context.
Now, using Features, we can create "module" define by the context. So, we will end up with a module called "youSite_forums", which will include all the views, blocks, etc. that was define in your Forums context. It also will determine the correct dependencies, as well as Content Types used in the context. All will be bundled up nicely in a module.
As for versioning content such as node, you can user either Node Export, or just do a DB dump using Backup and Migrate. We use these occasionally, but we never have every node versioned in SVN.
Links:
Features
Context
Backup and Migrate
数据库从开发站点迁移到实时站点的问题解决方案
Problem Solutions in Database Migration from Development to Live Sites
您可以在这里找到更多对此的意见:Drupal DATABASE 部署策略?
You can find some more opinions on this here: Drupal DATABASE deployment strategies?