Created
May 5, 2017 15:01
-
-
Save peteristhegreat/0bece6f4142d66b400774810f07fa658 to your computer and use it in GitHub Desktop.
sqlite3 cannot attach database, caused by sql formatting issues...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqldiff broken.db some_other.db | |
# output: sqldiff: cannot attach database "some_other.db" | |
# Use .dump to "clean" and resave the database | |
sqlite3 broken.db .dump | sqlite3 fixed.db | |
# Note that the fixed.db will likely be smaller than the original | |
sqldiff fixed.db some_other.db | |
# output: standard output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment