3131# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3232# IN THE SOFTWARE.
3333
34- VERSION=" 0.3.0 "
34+ VERSION=" 0.3.1 "
3535
3636# Default values
3737DEBUG=0
3838MPATH=" ./migrations/"
39- BACKEND=" mysql --batch "
40- BACKEND_ARGS=" "
39+ BACKEND=" mysql"
40+ BACKEND_ARGS=" --batch --skip-column-names --disable-pager "
4141
4242# Environment overrides
4343if [ -n " $GOMISQL_DEBUG " ]; then DEBUG=" $GOMISQL_DEBUG " ; fi
@@ -91,7 +91,7 @@ who_needs() {
9191 for MF in $MFS ; do
9292 DEPS=$( get_deps " $MF " )
9393 if echo " $DEPS " | grep -wq " $1 " ; then
94- # FIXME : we rely on our output, so we MUST mute backend() even in DEBUG mode. :-(
94+ # NOTE : we rely on our output, so we MUST mute backend() even in DEBUG mode. :-(
9595 if get_verify " $MF " | backend > /dev/null 2>&1 ; then
9696 echo " $MF "
9797 fi
@@ -220,8 +220,8 @@ while getopts ":hdp:b:a:" OPT; do
220220 b)
221221 case $OPTARG in
222222 mysql)
223- BACKEND=" mysql --batch --skip-column-names --disable-pager "
224- ;;
223+ BACKEND=" mysql"
224+ ;;
225225 sqlite|sqlite3)
226226 BACKEND=" sqlite3 -bail -batch -noheader"
227227 ;;
@@ -235,7 +235,7 @@ while getopts ":hdp:b:a:" OPT; do
235235 esac
236236 ;;
237237 a)
238- BACKEND_ARGS=" $OPTARG "
238+ BACKEND_ARGS=" $OPTARG $BACKEND_ARGS "
239239 ;;
240240 \? )
241241 echo " gomisql: Invalid option '-$OPTARG '"
@@ -313,7 +313,7 @@ Options:
313313-d Display all executed SQL and back-end output
314314-p <path> Location of migration SQL files [default: '${MPATH} ']
315315-b <backend> Back-end, one of: mysql (default), sqlite[3], postgresql|pgsql
316- -a <args> Arguments to pass to back-end command (batch mode is already set)
316+ -a <args> Additional arguments to pass to back-end command (batch mode is already set)
317317
318318Commands:
319319
0 commit comments