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
class LfsFileLock < ActiveRecord::Base
class LfsFileLock < ApplicationRecord
belongs_to :project
belongs_to :user
......
# frozen_string_literal: true
class LfsObject < ActiveRecord::Base
class LfsObject < ApplicationRecord
include AfterCommitQueue
include ObjectStorage::BackgroundMove
......
# frozen_string_literal: true
class LfsObjectsProject < ActiveRecord::Base
class LfsObjectsProject < ApplicationRecord
belongs_to :project
belongs_to :lfs_object
......
# frozen_string_literal: true
class List < ActiveRecord::Base
class List < ApplicationRecord
belongs_to :board
belongs_to :label
......
# frozen_string_literal: true
class Member < ActiveRecord::Base
class Member < ApplicationRecord
include AfterCommitQueue
include Sortable
include Importable
......
# frozen_string_literal: true
class MergeRequest < ActiveRecord::Base
class MergeRequest < ApplicationRecord
include AtomicInternalId
include IidRoutes
include Issuable
......
# 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'
......
# frozen_string_literal: true
class MergeRequestDiff < ActiveRecord::Base
class MergeRequestDiff < ApplicationRecord
include Sortable
include Importable
include ManualInverseAssociation
......
# frozen_string_literal: true
class MergeRequestDiffCommit < ActiveRecord::Base
class MergeRequestDiffCommit < ApplicationRecord
include ShaAttribute
belongs_to :merge_request_diff
......
# frozen_string_literal: true
class MergeRequestDiffFile < ActiveRecord::Base
class MergeRequestDiffFile < ApplicationRecord
include Gitlab::EncodingHelper
include DiffFile
......
# frozen_string_literal: true
class MergeRequestsClosingIssues < ActiveRecord::Base
class MergeRequestsClosingIssues < ApplicationRecord
belongs_to :merge_request
belongs_to :issue
......
# 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)
......
......@@ -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
......
# frozen_string_literal: true
class NoteDiffFile < ActiveRecord::Base
class NoteDiffFile < ApplicationRecord
include DiffFile
scope :for_commit_or_unresolved, -> do
......
# frozen_string_literal: true
class NotificationSetting < ActiveRecord::Base
class NotificationSetting < ApplicationRecord
include IgnorableColumn
ignore_column :events
......
# frozen_string_literal: true
class PagesDomain < ActiveRecord::Base
class PagesDomain < ApplicationRecord
VERIFICATION_KEY = 'gitlab-pages-verification-code'.freeze
VERIFICATION_THRESHOLD = 3.days.freeze
......
# frozen_string_literal: true
class PersonalAccessToken < ActiveRecord::Base
class PersonalAccessToken < ApplicationRecord
include Expirable
include IgnorableColumn
include TokenAuthenticatable
......
......@@ -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
......
# 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.
......
# frozen_string_literal: true
class ProgrammingLanguage < ActiveRecord::Base
class ProgrammingLanguage < ApplicationRecord
validates :name, presence: true
validates :color, allow_blank: false, color: true
......
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