📜  svn commit sqlite:数据库磁盘映像格式错误 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:38.928000             🧑  作者: Mango

代码示例1
sqlite3 .svn/wc.db

sqlite> .mode insert
sqlite> .output dump_all.sql
sqlite> .dump
sqlite> .exit

mv .svn/wc.db .svn/wc-corrupt.db
sqlite3 .svn/wc.db

sqlite> .read dump_all.sql
sqlite> .exit

//compare user-version from new db with backup
sqlite3 .svn/wc.db 'PRAGMA user_version;'
sqlite3 .svn/wc-corrupt.db 'PRAGMA user_version;' //remember user-version

sqlite3 .svn/wc.db 'PRAGMA user_version = XXX;' //replace XXX with user-version from backup