aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorMarcelo Silveira <marcelo@mhfs.com.br>2012-02-09 01:20:52 -0200
committerMarcelo Silveira <marcelo@mhfs.com.br>2012-02-09 01:20:52 -0200
commitd70e0236df61d69c9299fe63df94da35c87ee2d8 (patch)
tree50af271dab628625e95849345b7312c1d9dca50e /activerecord/CHANGELOG.md
parent12c3b3d65738eccb7b7a043b2a8a1ba65a46d34e (diff)
downloadrails-d70e0236df61d69c9299fe63df94da35c87ee2d8.tar.gz
rails-d70e0236df61d69c9299fe63df94da35c87ee2d8.tar.bz2
rails-d70e0236df61d69c9299fe63df94da35c87ee2d8.zip
Added where option to add_index to support postgresql partial indices
The `add_index` method now supports a `where` option that receives a string with the partial index criteria. add_index(:accounts, :code, :where => "active") Generates CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 69cf1193b6..3de5af22c5 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,18 @@
## Rails 4.0.0 (unreleased) ##
+* Added support for partial indices to PostgreSQL adapter
+
+ The `add_index` method now supports a `where` option that receives a
+ string with the partial index criteria.
+
+ add_index(:accounts, :code, :where => "active")
+
+ Generates
+
+ CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
+
+ *Marcelo Silveira*
+
* Implemented ActiveRecord::Relation#none method
The `none` method returns a chainable relation with zero records