aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-03-26 20:31:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-03-26 20:31:51 -0300
commit110f2ed23a81533706a246b9955b1186896fa84f (patch)
tree73f462df9765fb0ab048921af146f10c2bc43eb7 /activerecord/CHANGELOG.md
parent9ed0cf51b467907810ef3959c8e9cdf77370370e (diff)
parentcbe1bc29722ddeda12d8652c409cea156ddb85a3 (diff)
downloadrails-110f2ed23a81533706a246b9955b1186896fa84f.tar.gz
rails-110f2ed23a81533706a246b9955b1186896fa84f.tar.bz2
rails-110f2ed23a81533706a246b9955b1186896fa84f.zip
Merge branch 'rm-create-with-index'
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 6e77493de9..42b7618fa7 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,20 @@
+* Create indexes inline in CREATE TABLE for MySQL.
+
+ This is important, because adding an index on a temporary table after it has been created
+ would commit the transaction.
+
+ It also allows creating and dropping indexed tables with fewer queries and fewer permissions
+ required.
+
+ Example:
+
+ create_table :temp, temporary: true, as: "SELECT id, name, zip FROM a_really_complicated_query" do |t|
+ t.index :zip
+ end
+ # => CREATE TEMPORARY TABLE temp (INDEX (zip)) AS SELECT id, name, zip FROM a_really_complicated_query
+
+ *Cody Cutrer*, *Steve Rice*, *Rafael Mendonça Franca*
+
* Save `has_one` association even if the record doesn't changed.
Fixes #14407.