aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/app/templates/config/databases
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-02-24 18:49:26 +0100
committerXavier Noria <fxn@hashref.com>2012-02-24 18:50:51 +0100
commit5d70791ed0045daf16f773daffb6a388d02b49e7 (patch)
treefbd7440b989dde7938590b0407b0e27e8b4c14a3 /railties/lib/rails/generators/rails/app/templates/config/databases
parent9d1f1b1ea9e5d637984fda4f276db77ffd1dbdcb (diff)
downloadrails-5d70791ed0045daf16f773daffb6a388d02b49e7.tar.gz
rails-5d70791ed0045daf16f773daffb6a388d02b49e7.tar.bz2
rails-5d70791ed0045daf16f773daffb6a388d02b49e7.zip
explains why reconnect is false by default in the database.yml generated for MySQL
Diffstat (limited to 'railties/lib/rails/generators/rails/app/templates/config/databases')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/databases/mysql.yml11
1 files changed, 10 insertions, 1 deletions
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 cce166c7c3..dec4f3d395 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
@@ -1,5 +1,5 @@
# MySQL. Versions 4.1 and 5.0 are recommended.
-#
+#
# Install the MYSQL driver
# gem install mysql2
#
@@ -11,6 +11,9 @@
development:
adapter: mysql2
encoding: utf8
+ # It is recommended to leave reconnect disabled because automatic
+ # reconnections do not play nicely with transactions, which are
+ # used by Active Record all over the place.
reconnect: false
database: <%= app_name %>_development
pool: 5
@@ -28,6 +31,9 @@ development:
test:
adapter: mysql2
encoding: utf8
+ # It is recommended to leave reconnect disabled because automatic
+ # reconnections do not play nicely with transactions, which are
+ # used by Active Record all over the place.
reconnect: false
database: <%= app_name %>_test
pool: 5
@@ -42,6 +48,9 @@ test:
production:
adapter: mysql2
encoding: utf8
+ # It is recommended to leave reconnect disabled because automatic
+ # reconnections do not play nicely with transactions, which are
+ # used by Active Record all over the place.
reconnect: false
database: <%= app_name %>_production
pool: 5