Make sure the sqlite db is prepared in SAAS mode

Previously, the mysql database was prepared twice and sqlite not at all.
This commit is contained in:
Mike Dalessio
2025-11-29 14:09:55 -05:00
parent cb3ca8fa30
commit bd19b91e05
2 changed files with 8 additions and 3 deletions
+7
View File
@@ -65,6 +65,13 @@ setup_database() {
local label="${adapter:+ ($adapter)}"
local env_cmd="${adapter:+env DATABASE_ADAPTER=$adapter}"
# When setting up sqlite in SAAS mode, we need to disable SAAS so that
# database.yml will use database.sqlite.yml instead of the fizzy-saas config.
# We also unset BUNDLE_GEMFILE so the standard Gemfile is used (without fizzy-saas).
if [ -n "$SAAS" ] && [ "$adapter" = "sqlite" ]; then
env_cmd="env DATABASE_ADAPTER=$adapter SAAS=false BUNDLE_GEMFILE="
fi
if [ "$reset" = "true" ]; then
step "Resetting the database$label" $env_cmd rails db:reset
else