fixes #2422 Rails 3.2: before_destroy / dependent => :destroy ordering
fixes #2400 add foreign keys to database migrations