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 AbuseReport < ActiveRecord::Base
class AbuseReport < ApplicationRecord
include CacheMarkdownField
cache_markdown_field :message, pipeline: :single_line
......
# frozen_string_literal: true
class Appearance < ActiveRecord::Base
class Appearance < ApplicationRecord
include CacheableAttributes
include CacheMarkdownField
include ObjectStorage::BackgroundMove
......
# frozen_string_literal: true
class ApplicationSetting < ActiveRecord::Base
class ApplicationSetting < ApplicationRecord
include CacheableAttributes
include CacheMarkdownField
include TokenAuthenticatable
......
# frozen_string_literal: true
class ApplicationSetting
class Term < ActiveRecord::Base
class Term < ApplicationRecord
include CacheMarkdownField
has_many :term_agreements
......
# 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
......
# frozen_string_literal: true
class AwardEmoji < ActiveRecord::Base
class AwardEmoji < ApplicationRecord
DOWNVOTE_NAME = "thumbsdown".freeze
UPVOTE_NAME = "thumbsup".freeze
......
# frozen_string_literal: true
class Badge < ActiveRecord::Base
class Badge < ApplicationRecord
include FromUnion
# This structure sets the placeholders that the urls
......
# frozen_string_literal: true
class Board < ActiveRecord::Base
class Board < ApplicationRecord
belongs_to :group
belongs_to :project
......
# 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
......
# 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
......
# frozen_string_literal: true
class BroadcastMessage < ActiveRecord::Base
class BroadcastMessage < ApplicationRecord
include CacheMarkdownField
include Sortable
......
# frozen_string_literal: true
class ChatName < ActiveRecord::Base
class ChatName < ApplicationRecord
LAST_USED_AT_INTERVAL = 1.hour
belongs_to :service
......
# frozen_string_literal: true
class ChatTeam < ActiveRecord::Base
class ChatTeam < ApplicationRecord
validates :team_id, presence: true
validates :namespace, uniqueness: true
......
......@@ -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
......
......@@ -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'
......
# frozen_string_literal: true
module Ci
class BuildTraceChunk < ActiveRecord::Base
class BuildTraceChunk < ApplicationRecord
include FastDestroyAll
include ::Gitlab::ExclusiveLeaseHelpers
extend Gitlab::Ci::Model
......
# frozen_string_literal: true
module Ci
class BuildTraceSection < ActiveRecord::Base
class BuildTraceSection < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :build, class_name: 'Ci::Build'
......
# frozen_string_literal: true
module Ci
class BuildTraceSectionName < ActiveRecord::Base
class BuildTraceSectionName < ApplicationRecord
extend Gitlab::Ci::Model
belongs_to :project
......
# frozen_string_literal: true
module Ci
class GroupVariable < ActiveRecord::Base
class GroupVariable < ApplicationRecord
extend Gitlab::Ci::Model
include HasVariable
include Presentable
......
# frozen_string_literal: true
module Ci
class JobArtifact < ActiveRecord::Base
class JobArtifact < ApplicationRecord
include AfterCommitQueue
include ObjectStorage::BackgroundMove
extend Gitlab::Ci::Model
......
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