Commit 6587c5b3 authored by Doug Stull's avatar Doug Stull

Remove implicit enumerating of columns

- We now have explicit enumeration at the points needed
  instead via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66337
parent 99de1a31
...@@ -28,8 +28,6 @@ class GroupMember < Member ...@@ -28,8 +28,6 @@ class GroupMember < Member
attr_accessor :last_owner, :last_blocked_owner attr_accessor :last_owner, :last_blocked_owner
self.enumerate_columns_in_select_statements = true
def self.access_level_roles def self.access_level_roles
Gitlab::Access.options_with_owner Gitlab::Access.options_with_owner
end end
......
...@@ -9,10 +9,6 @@ ...@@ -9,10 +9,6 @@
# statement cache. If a different migration is then run and one of these columns is # statement cache. If a different migration is then run and one of these columns is
# removed in the meantime, the query is invalid. # removed in the meantime, the query is invalid.
ActiveRecord::Base.class_eval do
class_attribute :enumerate_columns_in_select_statements
end
module ActiveRecord module ActiveRecord
module QueryMethods module QueryMethods
private private
...@@ -20,8 +16,6 @@ module ActiveRecord ...@@ -20,8 +16,6 @@ module ActiveRecord
def build_select(arel) def build_select(arel)
if select_values.any? if select_values.any?
arel.project(*arel_columns(select_values.uniq)) arel.project(*arel_columns(select_values.uniq))
elsif klass.enumerate_columns_in_select_statements
arel.project(*klass.column_names.map { |field| table[field] })
else else
arel.project(@klass.arel_table[Arel.star]) arel.project(@klass.arel_table[Arel.star])
end end
......
...@@ -19,7 +19,6 @@ module EE ...@@ -19,7 +19,6 @@ module EE
include FromUnion include FromUnion
self.inheritance_column = :_type_disabled self.inheritance_column = :_type_disabled
self.enumerate_columns_in_select_statements = true
# backported from ApplicationRecord # backported from ApplicationRecord
def self.cached_column_list def self.cached_column_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment