版本控制 (SVN) 和管理示例数据?
我们开发了一个桌面应用程序,用于收集科学仪器的测量结果。
测量结果存储在单个 SQLite 数据库文件和一些关联的二进制数据文件中。
该应用程序附带了一些示例数据,因此我将预先填充的文件置于修订控制之下(我们使用 Subversion/Ankh/Tortoise)。
但现在我的同事抱怨说,每次他对项目进行更新时,他对数据库所做的任何更改都会被存储库中的示例数据数据库破坏。
我们如何管理这个:
当我们发布时,我们可以确保包含来自存储库的正确示例数据。
在版本之间,当我们从存储库更新代码时,数据库的工作副本不会被覆盖。
We've developed a desktop application that collects measurements from a scientific instrument.
The measurements are stored in a single SQLite database file and some associated binary data files.
The app ships with some sample data, so I've put the pre-populated files under revision control (we use Subversion/Ankh/Tortoise).
But now my co-worker is complaining that every time he does an Update on the project, any changes he may have made to the database get clobbered by the sample data database in the repository.
How can we manage this so:
When we do a release, we can ensure the proper sample data from the repository is included.
Between releases, our working copies of the database are not overwritten when we update our code from the repository.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看存储库中 SQL 脚本形式的数据,通过数据库更改管理工具(例如
dbdeploy
)进行管理版本控制对于文本文件很有用,但对于二进制文件则不然。任何可以表示为文本的内容都应该这样做。任何可以通过构建过程生成的东西 - dll、jar 等和数据库,都应该是构建过程的工件,并在存储库之外进行维护。
Look at having data in the form of SQL scripts in your repo, managed through a database change management tool like
dbdeploy
Version control is great with text files and not so with binaries. Anything that can be represented as text should be done so. And anything that can be generated through a build process - the dlls, jars, etc. and the db, should be artifacts of your build process and maintained outside your repo.