aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml3
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml5
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml3
-rw-r--r--railties/test/application/rake/dbs_test.rb6
11 files changed, 26 insertions, 12 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
index 334d2ba51c..e654dda695 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml
@@ -25,4 +25,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
index 0a2dc1b19e..fb9f74c2b3 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml
@@ -63,4 +63,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
index cda6bcab06..262b6110d2 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml
@@ -55,4 +55,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
index d76632f0ac..a6d029ba81 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml
@@ -44,4 +44,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
index 4aaa97b104..dec6f16830 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml
@@ -20,4 +20,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml
index 28a5418b49..413389d226 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml
@@ -38,4 +38,5 @@ test:
# Example:
# mysql2://myuser:mypass@localhost/somedatabase
#
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml
index 31abbe8ba6..ac70332bd7 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/oracle.yml
@@ -34,4 +34,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml
index 7a7a8c08e0..0ce64ed33d 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml
@@ -65,4 +65,5 @@ test:
# Example:
# postgres://myuser:mypass@localhost/somedatabase
#
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml
index d8b0b61e14..6be4443b5b 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml
@@ -24,6 +24,7 @@ test:
# instead read the configuration from the environment.
#
# Example:
-# sqlite3://myuser:mypass@localhost/somedatabase
+# sqlite3://myuser:mypass@localhost/full/path/to/somedatabase
#
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml
index c270497879..68b5cde269 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml
+++ b/railties/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml
@@ -44,4 +44,5 @@ test:
# Do not keep production credentials in the repository,
# instead read the configuration from the environment.
-production: <%%= ENV["RAILS_DATABASE_URL"] %>
+production:
+ url: <%%= ENV["RAILS_DATABASE_URL"] %>
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb
index 0f4f01df1b..9868707570 100644
--- a/railties/test/application/rake/dbs_test.rb
+++ b/railties/test/application/rake/dbs_test.rb
@@ -24,7 +24,11 @@ module ApplicationTests
# ensure it's using the DATABASE_URL
FileUtils.rm_rf("#{app_path}/config/database.yml")
File.open("#{app_path}/config/database.yml", 'w') do |f|
- f << {ENV['RAILS_ENV'] => %Q{<%= ENV['RAILS_DATABASE_URL'] %>}}.to_yaml
+ yaml = <<-YAML.strip_heredoc
+ #{ENV['RAILS_ENV']}:
+ url: <%= ENV['RAILS_DATABASE_URL'] %>
+ YAML
+ f << yaml
end
end