我相信你可以结合使用以下内容:
原文链接:https://www.f2er.com/sqlite/197952.html$ diff sqlite-file-1.sql sqlite-file-2.sql > sqlite-patch.diff $ patch -p0 sqlite-file-1.sql sqlite-patch.diff
我希望对你有用否则,我强烈建议咨询手册页:
$ man diff $ man patch
编辑:好的,这是整个漫画。
首先,转储数据库:
$ sqlite test1.sql .dump > test1.sql.txt $ sqlite test2.sql .dump > test2.sql.txt
$ diff -u test1.sql.txt test2.sql.txt > patch-0.1.diff
最后,要应用补丁:
$ patch -p0 test1.sql.txt patch-0.1.diff