shmig icon indicating copy to clipboard operation
shmig copied to clipboard

Sqlite fails when custom sqliterc exists

Open sandro opened this issue 4 years ago • 3 comments

Hi, I was having a difficult time getting the tool to work until I realized that my personal ~/.sqliterc file was causing grep to fail in the shmig script. So if you're having issues that look like the following:

➜ shmig status
shmig: creating migrations table: shmig_version
Error: near line 1: table `shmig_version` already exists

Try adding this to your shmig.conf to reset sqlite3 to its default client mode.

ARGS="-list -noheader"

or use -a "-list -noheader" on the command line.

For reference, my .sqliterc is as follows:

.headers on
.mode line

sandro avatar Dec 19 '20 18:12 sandro

Marked this as a bug; this should be the default behavior.

mbucc avatar Dec 20 '20 14:12 mbucc

That's great, I didn't want to impose with a PR but good to hear it'll be a default, thank you!

This is a very cool tool, love the concept, thanks for sharing it.

sandro avatar Dec 20 '20 17:12 sandro

Thanks for the detailed report, and glad you find it useful.

mbucc avatar Dec 20 '20 18:12 mbucc