Inherit from ApplicationRecord instead of ActiveRecord::Base

This commit is contained in:
Nick Thomas 2019-03-28 13:17:42 +00:00
parent a74c3e6c3b
commit 013f7cd24c
No known key found for this signature in database
GPG key ID: 2A313A47AFADACE9
149 changed files with 150 additions and 150 deletions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class AbuseReport < ActiveRecord::Base
class AbuseReport < ApplicationRecord
include CacheMarkdownField
cache_markdown_field :message, pipeline: :single_line

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Appearance < ActiveRecord::Base
class Appearance < ApplicationRecord
include CacheableAttributes
include CacheMarkdownField
include ObjectStorage::BackgroundMove

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ApplicationSetting < ActiveRecord::Base
class ApplicationSetting < ApplicationRecord
include CacheableAttributes
include CacheMarkdownField
include TokenAuthenticatable

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
class ApplicationSetting
class Term < ActiveRecord::Base
class Term < ApplicationRecord
include CacheMarkdownField
has_many :term_agreements

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class AuditEvent < ActiveRecord::Base
class AuditEvent < ApplicationRecord
serialize :details, Hash # rubocop:disable Cop/ActiveRecordSerialize
belongs_to :user, foreign_key: :author_id

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class AwardEmoji < ActiveRecord::Base
class AwardEmoji < ApplicationRecord
DOWNVOTE_NAME = "thumbsdown".freeze
UPVOTE_NAME = "thumbsup".freeze

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Badge < ActiveRecord::Base
class Badge < ApplicationRecord
include FromUnion
# This structure sets the placeholders that the urls

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Board < ActiveRecord::Base
class Board < ApplicationRecord
belongs_to :group
belongs_to :project

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
# Tracks which boards in a specific group a user has visited
class BoardGroupRecentVisit < ActiveRecord::Base
class BoardGroupRecentVisit < ApplicationRecord
belongs_to :user
belongs_to :group
belongs_to :board

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
# Tracks which boards in a specific project a user has visited
class BoardProjectRecentVisit < ActiveRecord::Base
class BoardProjectRecentVisit < ApplicationRecord
belongs_to :user
belongs_to :project
belongs_to :board

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class BroadcastMessage < ActiveRecord::Base
class BroadcastMessage < ApplicationRecord
include CacheMarkdownField
include Sortable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ChatName < ActiveRecord::Base
class ChatName < ApplicationRecord
LAST_USED_AT_INTERVAL = 1.hour
belongs_to :service

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ChatTeam < ActiveRecord::Base
class ChatTeam < ApplicationRecord
validates :team_id, presence: true
validates :namespace, uniqueness: true

View file

@ -3,7 +3,7 @@
module Ci
# The purpose of this class is to store Build related data that can be disposed.
# Data that should be persisted forever, should be stored with Ci::Build model.
class BuildMetadata < ActiveRecord::Base
class BuildMetadata < ApplicationRecord
extend Gitlab::Ci::Model
include Presentable
include ChronicDurationAttribute

View file

@ -3,7 +3,7 @@
module Ci
# The purpose of this class is to store Build related runner session.
# Data will be removed after transitioning from running to any state.
class BuildRunnerSession < ActiveRecord::Base
class BuildRunnerSession < ApplicationRecord
extend Gitlab::Ci::Model
self.table_name = 'ci_builds_runner_session'

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class BuildTraceChunk < ActiveRecord::Base
class BuildTraceChunk < ApplicationRecord
include FastDestroyAll
include ::Gitlab::ExclusiveLeaseHelpers
extend Gitlab::Ci::Model

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class BuildTraceSection < ActiveRecord::Base
class BuildTraceSection < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :build, class_name: 'Ci::Build'

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class BuildTraceSectionName < ActiveRecord::Base
class BuildTraceSectionName < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :project

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class GroupVariable < ActiveRecord::Base
class GroupVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
include Presentable

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class JobArtifact < ActiveRecord::Base
class JobArtifact < ApplicationRecord
include AfterCommitQueue
include ObjectStorage::BackgroundMove
extend Gitlab::Ci::Model

View file

@ -1,7 +1,7 @@
# 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 @@ module Ci
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

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class PipelineChatData < ActiveRecord::Base
class PipelineChatData < ApplicationRecord
self.table_name = 'ci_pipeline_chat_data'
belongs_to :chat_name

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class PipelineSchedule < ActiveRecord::Base
class PipelineSchedule < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include IgnorableColumn

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class PipelineScheduleVariable < ActiveRecord::Base
class PipelineScheduleVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class PipelineVariable < ActiveRecord::Base
class PipelineVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class Runner < ActiveRecord::Base
class Runner < ApplicationRecord
extend Gitlab::Ci::Model
include Gitlab::SQL::Pattern
include IgnorableColumn

View file

@ -1,7 +1,7 @@
# 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

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class RunnerProject < ActiveRecord::Base
class RunnerProject < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :runner, inverse_of: :runner_projects

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class Stage < ActiveRecord::Base
class Stage < ApplicationRecord
extend Gitlab::Ci::Model
include Importable
include HasStatus

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class Trigger < ActiveRecord::Base
class Trigger < ApplicationRecord
extend Gitlab::Ci::Model
include IgnorableColumn
include Presentable

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class TriggerRequest < ActiveRecord::Base
class TriggerRequest < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :trigger

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Ci
class Variable < ActiveRecord::Base
class Variable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
include Presentable

View file

@ -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'

View file

@ -4,7 +4,7 @@ require 'openssl'
module Clusters
module Applications
class Helm < ActiveRecord::Base
class Helm < ApplicationRecord
self.table_name = 'clusters_applications_helm'
attr_encrypted :ca_key,

View file

@ -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'

View file

@ -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'

View file

@ -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

View file

@ -2,7 +2,7 @@
module Clusters
module Applications
class Prometheus < ActiveRecord::Base
class Prometheus < ApplicationRecord
include PrometheusAdapter
VERSION = '6.7.3'

View file

@ -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'

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Clusters
class Cluster < ActiveRecord::Base
class Cluster < ApplicationRecord
include Presentable
include Gitlab::Utils::StrongMemoize
include FromUnion

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Clusters
class Group < ActiveRecord::Base
class Group < ApplicationRecord
self.table_name = 'cluster_groups'
belongs_to :cluster, class_name: 'Clusters::Cluster'

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Clusters
class KubernetesNamespace < ActiveRecord::Base
class KubernetesNamespace < ApplicationRecord
include Gitlab::Kubernetes
self.table_name = 'clusters_kubernetes_namespaces'

View file

@ -2,7 +2,7 @@
module Clusters
module Platforms
class Kubernetes < ActiveRecord::Base
class Kubernetes < ApplicationRecord
include Gitlab::Kubernetes
include ReactiveCaching
include EnumWithNil

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Clusters
class Project < ActiveRecord::Base
class Project < ApplicationRecord
self.table_name = 'cluster_projects'
belongs_to :cluster, class_name: 'Clusters::Cluster'

View file

@ -2,7 +2,7 @@
module Clusters
module Providers
class Gcp < ActiveRecord::Base
class Gcp < ApplicationRecord
self.table_name = 'cluster_providers_gcp'
belongs_to :cluster, inverse_of: :provider_gcp, class_name: 'Clusters::Cluster'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class CommitStatus < ActiveRecord::Base
class CommitStatus < ApplicationRecord
include HasStatus
include Importable
include AfterCommitQueue

View file

@ -7,7 +7,7 @@
#
# For example, let's generate internal ids for Issue per Project:
# ```
# class Issue < ActiveRecord::Base
# class Issue < ApplicationRecord
# has_internal_id :iid, scope: :project, init: ->(s) { s.project.issues.maximum(:iid) }
# end
# ```

View file

@ -5,7 +5,7 @@
#
# Example:
#
# class User < ActiveRecord::Base
# class User < ApplicationRecord
# include IgnorableColumn
#
# ignore_column :updated_at

View file

@ -7,7 +7,7 @@
#
# Usage:
#
# class Issue < ActiveRecord::Base
# class Issue < ApplicationRecord
# include Participable
#
# # ...

View file

@ -7,7 +7,7 @@
#
# Example of use:
#
# class Foo < ActiveRecord::Base
# class Foo < ApplicationRecord
# include ReactiveCaching
#
# self.reactive_cache_key = ->(thing) { ["foo", thing.id] }

View file

@ -39,7 +39,7 @@ module ShaAttribute
end
def database_exists?
ActiveRecord::Base.connection
ApplicationRecord.connection
true
rescue

View file

@ -6,7 +6,7 @@
#
# Usage:
#
# class Milestone < ActiveRecord::Base
# class Milestone < ApplicationRecord
# strip_attributes :title
# end
#

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ContainerRepository < ActiveRecord::Base
class ContainerRepository < ApplicationRecord
include Gitlab::Utils::StrongMemoize
belongs_to :project

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ConversationalDevelopmentIndex
class Metric < ActiveRecord::Base
class Metric < ApplicationRecord
include Presentable
self.table_name = 'conversational_development_index_metrics'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class DeployKeysProject < ActiveRecord::Base
class DeployKeysProject < ApplicationRecord
belongs_to :project
belongs_to :deploy_key, inverse_of: :deploy_keys_projects

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class DeployToken < ActiveRecord::Base
class DeployToken < ApplicationRecord
include Expirable
include TokenAuthenticatable
include PolicyActor

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Deployment < ActiveRecord::Base
class Deployment < ApplicationRecord
include AtomicInternalId
include IidRoutes
include AfterCommitQueue

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Email < ActiveRecord::Base
class Email < ApplicationRecord
include Sortable
include Gitlab::SQL::Pattern

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Environment < ActiveRecord::Base
class Environment < ApplicationRecord
include Gitlab::Utils::StrongMemoize
# Used to generate random suffixes for the slug
LETTERS = 'a'..'z'

View file

@ -2,7 +2,7 @@
# Placeholder class for model that is implemented in EE
# It reserves '&' as a reference prefix, but the table does not exists in CE
class Epic < ActiveRecord::Base
class Epic < ApplicationRecord
def self.link_reference_pattern
nil
end

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ErrorTracking
class ProjectErrorTrackingSetting < ActiveRecord::Base
class ProjectErrorTrackingSetting < ApplicationRecord
include Gitlab::Utils::StrongMemoize
include ReactiveCaching

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Event < ActiveRecord::Base
class Event < ApplicationRecord
include Sortable
include IgnorableColumn
include FromUnion

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ForkNetwork < ActiveRecord::Base
class ForkNetwork < ApplicationRecord
belongs_to :root_project, class_name: 'Project'
has_many :fork_network_members
has_many :projects, through: :fork_network_members

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ForkNetworkMember < ActiveRecord::Base
class ForkNetworkMember < ApplicationRecord
belongs_to :fork_network
belongs_to :project
belongs_to :forked_from_project, class_name: 'Project'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class GpgKey < ActiveRecord::Base
class GpgKey < ApplicationRecord
KEY_PREFIX = '-----BEGIN PGP PUBLIC KEY BLOCK-----'.freeze
KEY_SUFFIX = '-----END PGP PUBLIC KEY BLOCK-----'.freeze

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class GpgKeySubkey < ActiveRecord::Base
class GpgKeySubkey < ApplicationRecord
include ShaAttribute
sha_attribute :keyid

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class GroupCustomAttribute < ActiveRecord::Base
class GroupCustomAttribute < ApplicationRecord
belongs_to :group
validates :group, :key, :value, presence: true

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class WebHook < ActiveRecord::Base
class WebHook < ApplicationRecord
include Sortable
attr_encrypted :token,

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class WebHookLog < ActiveRecord::Base
class WebHookLog < ApplicationRecord
belongs_to :web_hook
serialize :request_headers, Hash # rubocop:disable Cop/ActiveRecordSerialize

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Identity < ActiveRecord::Base
class Identity < ApplicationRecord
include Sortable
include CaseSensitivity

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Identity < ActiveRecord::Base
class Identity < ApplicationRecord
# This module and method are defined in a separate file to allow EE to
# redefine the `scopes` method before it is used in the `Identity` model.
module UniquenessScopes

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ImportExportUpload < ActiveRecord::Base
class ImportExportUpload < ApplicationRecord
include WithUploads
include ObjectStorage::BackgroundMove

View file

@ -15,7 +15,7 @@
# In order to leverage InternalId for other usages, the idea is to
# * Add `usage` value to enum
# * (Optionally) add columns to `internal_ids` if needed for scope.
class InternalId < ActiveRecord::Base
class InternalId < ApplicationRecord
belongs_to :project
belongs_to :namespace

View file

@ -2,7 +2,7 @@
require 'carrierwave/orm/activerecord'
class Issue < ActiveRecord::Base
class Issue < ApplicationRecord
include AtomicInternalId
include IidRoutes
include Issuable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Issue::Metrics < ActiveRecord::Base
class Issue::Metrics < ApplicationRecord
belongs_to :issue
def record!

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class IssueAssignee < ActiveRecord::Base
class IssueAssignee < ApplicationRecord
belongs_to :issue
belongs_to :assignee, class_name: "User", foreign_key: :user_id
end

View file

@ -2,7 +2,7 @@
require 'digest/md5'
class Key < ActiveRecord::Base
class Key < ApplicationRecord
include AfterCommitQueue
include Sortable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Label < ActiveRecord::Base
class Label < ApplicationRecord
include CacheMarkdownField
include Referable
include Subscribable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class LabelLink < ActiveRecord::Base
class LabelLink < ApplicationRecord
include Importable
belongs_to :target, polymorphic: true, inverse_of: :label_links # rubocop:disable Cop/PolymorphicAssociations

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class LabelPriority < ActiveRecord::Base
class LabelPriority < ApplicationRecord
belongs_to :project
belongs_to :label

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class LfsFileLock < ActiveRecord::Base
class LfsFileLock < ApplicationRecord
belongs_to :project
belongs_to :user

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class LfsObject < ActiveRecord::Base
class LfsObject < ApplicationRecord
include AfterCommitQueue
include ObjectStorage::BackgroundMove

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class LfsObjectsProject < ActiveRecord::Base
class LfsObjectsProject < ApplicationRecord
belongs_to :project
belongs_to :lfs_object

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class List < ActiveRecord::Base
class List < ApplicationRecord
belongs_to :board
belongs_to :label

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Member < ActiveRecord::Base
class Member < ApplicationRecord
include AfterCommitQueue
include Sortable
include Importable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequest < ActiveRecord::Base
class MergeRequest < ApplicationRecord
include AtomicInternalId
include IidRoutes
include Issuable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequest::Metrics < ActiveRecord::Base
class MergeRequest::Metrics < ApplicationRecord
belongs_to :merge_request
belongs_to :pipeline, class_name: 'Ci::Pipeline', foreign_key: :pipeline_id
belongs_to :latest_closed_by, class_name: 'User'

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequestDiff < ActiveRecord::Base
class MergeRequestDiff < ApplicationRecord
include Sortable
include Importable
include ManualInverseAssociation

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequestDiffCommit < ActiveRecord::Base
class MergeRequestDiffCommit < ApplicationRecord
include ShaAttribute
belongs_to :merge_request_diff

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequestDiffFile < ActiveRecord::Base
class MergeRequestDiffFile < ApplicationRecord
include Gitlab::EncodingHelper
include DiffFile

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class MergeRequestsClosingIssues < ActiveRecord::Base
class MergeRequestsClosingIssues < ApplicationRecord
belongs_to :merge_request
belongs_to :issue

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class Milestone < ActiveRecord::Base
class Milestone < ApplicationRecord
# Represents a "No Milestone" state used for filtering Issues and Merge
# Requests that have no milestone assigned.
MilestoneStruct = Struct.new(:title, :name, :id)

View file

@ -3,7 +3,7 @@
# A note on the root of an issue, merge request, commit, or snippet.
#
# A note of this type is never resolvable.
class Note < ActiveRecord::Base
class Note < ApplicationRecord
extend ActiveModel::Naming
include Participable
include Mentionable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class NoteDiffFile < ActiveRecord::Base
class NoteDiffFile < ApplicationRecord
include DiffFile
scope :for_commit_or_unresolved, -> do

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class NotificationSetting < ActiveRecord::Base
class NotificationSetting < ApplicationRecord
include IgnorableColumn
ignore_column :events

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class PagesDomain < ActiveRecord::Base
class PagesDomain < ApplicationRecord
VERIFICATION_KEY = 'gitlab-pages-verification-code'.freeze
VERIFICATION_THRESHOLD = 3.days.freeze

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class PersonalAccessToken < ActiveRecord::Base
class PersonalAccessToken < ApplicationRecord
include Expirable
include IgnorableColumn
include TokenAuthenticatable

View file

@ -3,7 +3,7 @@
# The PoolRepository model is the database equivalent of an ObjectPool for Gitaly
# That is; PoolRepository is the record in the database, ObjectPool is the
# repository on disk
class PoolRepository < ActiveRecord::Base
class PoolRepository < ApplicationRecord
include Shardable
include AfterCommitQueue

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Postgresql
class ReplicationSlot < ActiveRecord::Base
class ReplicationSlot < ApplicationRecord
self.table_name = 'pg_replication_slots'
# Returns true if there are any replication slots in use.

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class ProgrammingLanguage < ActiveRecord::Base
class ProgrammingLanguage < ApplicationRecord
validates :name, presence: true
validates :color, allow_blank: false, color: true

Some files were not shown because too many files have changed in this diff Show more