Skip to content

Commit 3e582ea

Browse files
authored
Merge pull request #679 from inayuky/fix-db-change-command
Fix rails db:system:change command failure issue
2 parents 1908710 + 6bfe665 commit 3e582ea

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/spring/client/rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def call
2020

2121
if COMMANDS.include?(command_name)
2222
Run.call(["rails_#{command_name}", *args.drop(2)])
23-
elsif command_name&.start_with?("db:")
23+
elsif command_name&.start_with?("db:") && !command_name.start_with?("db:system")
2424
Run.call(["rake", *args.drop(1)])
2525
else
2626
require "spring/configuration"

test/support/acceptance_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,10 @@ def exec_name
707707
2.times { app.run "bin/rails db:migrate" }
708708
end
709709
end
710+
711+
test "rails db:system:change" do
712+
assert_success "bin/rails db:system:change --to=sqlite3"
713+
end
710714
end
711715
end
712716
end

0 commit comments

Comments
 (0)