diff --git a/nix/mariadb-up-mac.nix b/nix/mariadb-up-mac.nix --- a/nix/mariadb-up-mac.nix +++ b/nix/mariadb-up-mac.nix @@ -24,6 +24,8 @@ exec "${mariadb}/bin/mariadbd" \ --socket "$MARIADB_DIR"/mysql.sock \ --datadir "$MARIADB_DIR" \ + --innodb-ft-min-token-size=1 \ + --innodb-ft-enable-stopword=0 \ &> "$MARIADB_DIR"/logs ''; }; diff --git a/scripts/comm-dev.sh b/scripts/comm-dev.sh --- a/scripts/comm-dev.sh +++ b/scripts/comm-dev.sh @@ -16,6 +16,7 @@ echo "" echo "Commands:" echo " services - start or stop development services" + echo " db - restart MariaDB server" echo "" exit 1 @@ -56,6 +57,30 @@ esac } +db_usage() { + echo "Comm MariaDB Server" + echo "" + echo "Commands:" + echo " restart - restart MariaDB server" + echo "" + + exit 1 +} + +db_command() { + case "$1" in + restart) + pkill mariadbd + nix run .#mariadb-up + ;; + *) + log "$(basename "$0"): unknown db option '$1'" + db_usage + exit 1 + ;; + esac +} + case "$1" in -h|--help) usage @@ -64,6 +89,10 @@ shift services_command "$@" ;; + db) + shift + db_command "$@" + ;; *) log "$(basename "$0"): unknown option '$1'" usage