Add explicit primary key declaration for changeset subscriptions

This table has a composite primary key and although we don't really
rely on that at all rails 5.0 warns about itif you don't explcitly
declare it in order to trigger the CPK extension.
This commit is contained in:
Tom Hughes 2017-06-06 20:33:09 +01:00
parent 07673278f1
commit fb4ea1a02a

View file

@ -1,4 +1,6 @@
class DiaryEntrySubscription < ActiveRecord::Base
self.primary_keys = "user_id", "diary_entry_id"
belongs_to :user
belongs_to :diary_entry
end