Greetings, I try to add a foreign key in one of my rails migrations in the following way: def self.up add_reference :categories, :items end This, strangely, leads to the following error during the migration: -- add_reference(:categories, :items) rake aborted! undefined method `add_reference'' for # In the same way fails the code: def self.up change_table :categories do |t| t.references :items end end I recently upgraded to Rails 2.1.2, if this is relevant to my case. Does anyone have any pointers on how to solve this problem? Thanks in advance! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---