aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2011-01-31 13:21:03 +0000
committerPratik Naik <pratiknaik@gmail.com>2011-01-31 13:21:25 +0000
commit30176f28a41681c7607eed39d03501327869d40c (patch)
tree49bd72c3023c85d25d848095d9db7e5bcde9bbf8 /activerecord/CHANGELOG
parent9db4c07e0bdf60982d08cb26035573995404eb98 (diff)
downloadrails-30176f28a41681c7607eed39d03501327869d40c.tar.gz
rails-30176f28a41681c7607eed39d03501327869d40c.tar.bz2
rails-30176f28a41681c7607eed39d03501327869d40c.zip
Add :bulk => true option to change_table
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index d84fe655a7..d1124801df 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,18 @@
*Rails 3.1.0 (unreleased)*
+* Add :bulk => true option to change_table to make all the schema changes defined in change_table block using a single ALTER statement. [Pratik Naik]
+
+ Example:
+
+ change_table(:users, :bulk => true) do |t|
+ t.string :company_name
+ t.change :birthdate, :datetime
+ end
+
+ This will now result in:
+
+ ALTER TABLE `users` ADD COLUMN `company_name` varchar(255), CHANGE `updated_at` `updated_at` datetime DEFAULT NULL
+
* Removed support for accessing attributes on a has_and_belongs_to_many join table. This has been
documented as deprecated behaviour since April 2006. Please use has_many :through instead.
[Jon Leighton]