Commit 2a24b25d authored by Nick Thomas's avatar Nick Thomas
Browse files

Inherit from ApplicationRecord instead of ActiveRecord::Base

parent c4f8d7e5ecfd
# frozen_string_literal: true
module Ci
class Pipeline < ActiveRecord::Base
class Pipeline < ApplicationRecord
extend Gitlab::Ci::Model
include HasStatus
include Importable
......@@ -184,7 +184,7 @@ class Pipeline < ActiveRecord::Base
scope :sort_by_merge_request_pipelines, -> do
sql = 'CASE ci_pipelines.source WHEN (?) THEN 0 ELSE 1 END, ci_pipelines.id DESC'
query = ActiveRecord::Base.send(:sanitize_sql_array, [sql, sources[:merge_request_event]]) # rubocop:disable GitlabSecurity/PublicSend
query = ApplicationRecord.send(:sanitize_sql_array, [sql, sources[:merge_request_event]]) # rubocop:disable GitlabSecurity/PublicSend
order(query)
end
......
# frozen_string_literal: true
module Ci
class PipelineChatData < ActiveRecord::Base
class PipelineChatData < ApplicationRecord
self.table_name = 'ci_pipeline_chat_data'
belongs_to :chat_name
......
# frozen_string_literal: true
module Ci
class PipelineSchedule < ActiveRecord::Base
class PipelineSchedule < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include IgnorableColumn
......
# frozen_string_literal: true
module Ci
class PipelineScheduleVariable < ActiveRecord::Base
class PipelineScheduleVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
......
# frozen_string_literal: true
module Ci
class PipelineVariable < ActiveRecord::Base
class PipelineVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
......
# frozen_string_literal: true
module Ci
class Runner < ActiveRecord::Base
class Runner < ApplicationRecord
extend Gitlab::Ci::Model
include Gitlab::SQL::Pattern
include IgnorableColumn
......
# frozen_string_literal: true
module Ci
class RunnerNamespace < ActiveRecord::Base
class RunnerNamespace < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :runner, inverse_of: :runner_namespaces, validate: true
......
# frozen_string_literal: true
module Ci
class RunnerProject < ActiveRecord::Base
class RunnerProject < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :runner, inverse_of: :runner_projects
......
# frozen_string_literal: true
module Ci
class Stage < ActiveRecord::Base
class Stage < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include HasStatus
......
# frozen_string_literal: true
module Ci
class Trigger < ActiveRecord::Base
class Trigger < ApplicationRecord
extend Gitlab::Ci::Model
include IgnorableColumn
include Presentable
......
# frozen_string_literal: true
module Ci
class TriggerRequest < ActiveRecord::Base
class TriggerRequest < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :trigger
......
# frozen_string_literal: true
module Ci
class Variable < ActiveRecord::Base
class Variable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
include Presentable
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class CertManager < ActiveRecord::Base
class CertManager < ApplicationRecord
VERSION = 'v0.5.2'.freeze
self.table_name = 'clusters_applications_cert_managers'
......
......@@ -4,7 +4,7 @@
module Clusters
module Applications
class Helm < ActiveRecord::Base
class Helm < ApplicationRecord
self.table_name = 'clusters_applications_helm'
attr_encrypted :ca_key,
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class Ingress < ActiveRecord::Base
class Ingress < ApplicationRecord
VERSION = '1.1.2'.freeze
self.table_name = 'clusters_applications_ingress'
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class Jupyter < ActiveRecord::Base
class Jupyter < ApplicationRecord
VERSION = '0.9-174bbd5'.freeze
self.table_name = 'clusters_applications_jupyter'
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class Knative < ActiveRecord::Base
class Knative < ApplicationRecord
VERSION = '0.3.0'.freeze
REPOSITORY = 'https://storage.googleapis.com/triggermesh-charts'.freeze
METRICS_CONFIG = 'https://storage.googleapis.com/triggermesh-charts/istio-metrics.yaml'.freeze
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class Prometheus < ActiveRecord::Base
class Prometheus < ApplicationRecord
include PrometheusAdapter
VERSION = '6.7.3'
......
......@@ -2,7 +2,7 @@
module Clusters
module Applications
class Runner < ActiveRecord::Base
class Runner < ApplicationRecord
VERSION = '0.3.0'.freeze
self.table_name = 'clusters_applications_runners'
......
# frozen_string_literal: true
module Clusters
class Cluster < ActiveRecord::Base
class Cluster < ApplicationRecord
include Presentable
include Gitlab::Utils::StrongMemoize
include FromUnion
......
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