File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
lib/rails/generators/rails/db/system/change Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Fix running ` db:system:change ` when app has no Dockerfile.
2
+
3
+ * Hartley McGuire*
4
+
1
5
* In Action Mailer previews, list inline attachments separately from normal
2
6
attachments. For example, attachments that were previously listed like
3
7
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ def edit_gemfile
41
41
end
42
42
43
43
def edit_dockerfile
44
+ dockerfile_path = File . expand_path ( "Dockerfile" , destination_root )
45
+ return unless File . exist? ( dockerfile_path )
46
+
44
47
build_name = docker_for_database_build
45
48
deploy_name = docker_for_database_deploy
46
49
if build_name
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ class Rails::Command::DbSystemChangeTest < ActiveSupport::TestCase
60
60
assert_match "gsub Gemfile" , output
61
61
end
62
62
63
+ test "change works with no Dockerfile" do
64
+ remove_file ( "Dockerfile" )
65
+
66
+ output = change_database ( to : "sqlite3" )
67
+
68
+ assert_match "gsub Gemfile" , output
69
+ end
70
+
63
71
private
64
72
def change_database ( to :, **options )
65
73
args = [ "--to" , to ]
You can’t perform that action at this time.
0 commit comments