Commit 7fc35578 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Set the table names explicitly

parent 8507a7cd
...@@ -42,6 +42,8 @@ module EE ...@@ -42,6 +42,8 @@ module EE
include Visibility include Visibility
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
self.table_name = 'projects'
# These are the artifact file types to query # These are the artifact file types to query
# only security report related artifacts. # only security report related artifacts.
# sast: 5 # sast: 5
...@@ -191,6 +193,8 @@ module EE ...@@ -191,6 +193,8 @@ module EE
include Routable include Routable
include Visibility include Visibility
self.table_name = 'namespaces'
belongs_to :parent, class_name: 'Namespace' belongs_to :parent, class_name: 'Namespace'
def self.find_sti_class(type_name) def self.find_sti_class(type_name)
...@@ -204,10 +208,14 @@ module EE ...@@ -204,10 +208,14 @@ module EE
end end
end end
class Route < ActiveRecord::Base; end class Route < ActiveRecord::Base
self.table_name = 'routes'
end
class Vulnerability < ActiveRecord::Base class Vulnerability < ActiveRecord::Base
include EachBatch include EachBatch
self.table_name = 'vulnerabilities'
scope :not_found_in_pipeline_id, -> (pipeline_id) do scope :not_found_in_pipeline_id, -> (pipeline_id) do
where(<<~SQL) where(<<~SQL)
NOT EXISTS ( NOT EXISTS (
......
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