Skip to content
Browse files

Add changelog entry for references statements

  • Loading branch information...
1 parent 68f0ef9 commit 17d2115e3df6caf15d554b44e28177069fa3ed5b @lexmag lexmag committed with rafaelfranca
Showing with 13 additions and 0 deletions.
  1. +13 −0 activerecord/
13 activerecord/
@@ -1,5 +1,18 @@
## Rails 4.0.0 (unreleased) ##
+* Add `add_reference` and `remove_reference` schema statements. Aliases, `add_belongs_to`
+ and `remove_belongs_to` are acceptable. References are reversible.
+ Examples:
+ # Create a user_id column
+ add_reference(:products, :user)
+ # Create a supplier_id, supplier_type columns and appropriate index
+ add_reference(:products, :supplier, polymorphic: true, index: true)
+ # Remove polymorphic reference
+ remove_reference(:products, :supplier, polymorphic: true)
+ *Aleksey Magusev*
* Add `:default` and `:null` options to `column_exists?`.
column_exists?(:testings, :taggable_id, :integer, null: false)

3 comments on commit 17d2115

Ruby on Rails member

@vijaydev should I add this to the Release Notes?

Ruby on Rails member

Yes please.

Ruby on Rails member

Done at b5a2f24

Please sign in to comment.
Something went wrong with that request. Please try again.