Welcome to mirror list, hosted at ThFree Co, Russian Federation.

schema_inconsistency.rb « schema_validation « database « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9f39db5b4c0f6b90315571efe9202c69c35d23ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Gitlab
  module Database
    module SchemaValidation
      class SchemaInconsistency < ApplicationRecord
        self.table_name = :schema_inconsistencies

        belongs_to :issue

        validates :object_name, :valitador_name, :table_name, :diff, presence: true

        scope :with_open_issues, -> { joins(:issue).where('issue.state_id': Issue.available_states[:opened]) }
      end
    end
  end
end