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
48 48
    :scope =>
49 49
      proc do
50 50
        select("#{Attachment.table_name}.*").
51
          where(container_type: ['Version', 'Project']).
51 52
          joins(
52 53
            "LEFT JOIN #{Version.table_name} " \
53 54
              "ON #{Attachment.table_name}.container_type='Version' " \
(1-1/3)