mbucc / shmig

Database migration tool written in BASH.
BSD 3-Clause "New" or "Revised" License
458 stars 49 forks source link

Sqlite fails when custom sqliterc exists #66

Open sandro opened 3 years ago

sandro commented 3 years ago

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
mbucc commented 3 years ago

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

sandro commented 3 years ago

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.

mbucc commented 3 years ago

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