Skip to content

Commit

Permalink
Merge pull request #679 from inayuky/fix-db-change-command
Browse files Browse the repository at this point in the history
Fix rails db:system:change command failure issue
  • Loading branch information
rafaelfranca authored Sep 20, 2022
2 parents 1908710 + 6bfe665 commit 3e582ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spring/client/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def call

if COMMANDS.include?(command_name)
Run.call(["rails_#{command_name}", *args.drop(2)])
elsif command_name&.start_with?("db:")
elsif command_name&.start_with?("db:") && !command_name.start_with?("db:system")
Run.call(["rake", *args.drop(1)])
else
require "spring/configuration"
Expand Down
4 changes: 4 additions & 0 deletions test/support/acceptance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,10 @@ def exec_name
2.times { app.run "bin/rails db:migrate" }
end
end

test "rails db:system:change" do
assert_success "bin/rails db:system:change --to=sqlite3"
end
end
end
end

0 comments on commit 3e582ea

Please sign in to comment.