How can I diff 2 SQLite files?(如何区分 2 个 SQLite 文件?)
问题描述
在 Mac 上使用 SQLite-manager(以其 XUL 形式).
Using SQLite-manager (in its XUL form) on a Mac.
如何将 SQLite 文件与团队中其他人提交的文件区分开来,并合并他的更改?
How can I diff a SQLite file from one submitted by someone else on the team, and incorporate his changes?
谢谢.
推荐答案
我相信您可以结合使用以下内容:
I believe you could use the following, in combination:
$ diff sqlite-file-1.sql sqlite-file-2.sql > sqlite-patch.diff
$ patch -p0 sqlite-file-1.sql sqlite-patch.diff
我希望这对你有用.否则,我强烈建议您查阅手册页:
I hope that works for you. Otherwise, I highly suggest consulting the man-pages:
$ man diff
$ man patch
好的,这是整个演练.
首先,转储数据库:
$ sqlite test1.sql .dump > test1.sql.txt
$ sqlite test2.sql .dump > test2.sql.txt
接下来,生成一个差异文件:
Next, generate a diff file:
$ diff -u test1.sql.txt test2.sql.txt > patch-0.1.diff
最后,应用补丁:
$ patch -p0 test1.sql.txt patch-0.1.diff
这篇关于如何区分 2 个 SQLite 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何区分 2 个 SQLite 文件?


- 在SQL中,如何为每个组选择前2行 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- SQL 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01