Use foreign_key to define column name
This commit is contained in:
parent
fe5735a860
commit
bcd009e661
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ module Ci
|
|||
self.table_name = 'ci_commits'
|
||||
|
||||
belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id
|
||||
has_many :statuses, class_name: 'CommitStatus'
|
||||
has_many :builds, class_name: 'Ci::Build'
|
||||
has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id
|
||||
has_many :builds, class_name: 'Ci::Build', foreign_key: :commit_id
|
||||
has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest'
|
||||
|
||||
validates_presence_of :sha
|
||||
|
|
Loading…
Reference in a new issue