Skip to content
Snippets Groups Projects

Use a separate table for storing push events

Merged Yorick Peterse requested to merge split-events-into-push-events into master
Compare and Show latest version
4 files
+ 28
28
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
2
@@ -66,8 +66,10 @@ class Event < ActiveRecord::Base
end
scope :with_associations, -> do
includes(:author, :project, :push_event_payload, project: :namespace)
.preload(:target)
# We're using preload for "push_event_payload" as otherwise the association
# is not always available (depending on the query being built).
includes(:author, :project, project: :namespace)
.preload(:target, :push_event_payload)
end
scope :for_milestone_id, ->(milestone_id) { where(target_type: "Milestone", target_id: milestone_id) }
Loading