diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 13:58:35 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 13:58:35 +0200 |
commit | bcd009e661291554cffe404123de629860519602 (patch) | |
tree | 2cc970a4e77e8dcf7f6d13faf80b113f767796d7 | |
parent | fe5735a8602b286953477eff5c58ce88b0054c7d (diff) | |
download | gitlab-ce-bcd009e661291554cffe404123de629860519602.tar.gz |
Use foreign_key to define column name
-rw-r--r-- | app/models/ci/pipeline.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 4d4f8951366..92fc7c89bd4 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -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 |