Project

General

Profile

Patch #37057 » 0001-Attachment-activity-provider-sql-optimization.patch

Jens Krämer, 2022-04-28 13:34

View differences:

app/models/attachment.rb
:scope =>
proc do
select("#{Attachment.table_name}.*").
where(container_type: ['Version', 'Project']).
joins(
"LEFT JOIN #{Version.table_name} " \
"ON #{Attachment.table_name}.container_type='Version' " \
(1-1/3)