Allow setting the DB dialect on environment variables.

This commit is contained in:
Joshua Haase 2024-06-21 00:29:15 -06:00
parent 3dc1c5bd1a
commit ace8d13f8a
No known key found for this signature in database
GPG Key ID: 5FC681B4822DABB0

View File

@ -3,7 +3,7 @@
# if user is using our env variables set the DB_URL
if [[ -n ${DB_HOST+x} ]]; then
export CMD_DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
export CMD_DB_URL="${CMD_DB_DIALECT:-mysql}://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
fi
# set env var for sqlite if db url and db_host unset