2015-08-25 21:42:46 -04:00
|
|
|
# == Schema Information
|
|
|
|
#
|
2015-11-13 13:22:46 -05:00
|
|
|
# Table name: ci_runner_projects
|
2015-08-25 21:42:46 -04:00
|
|
|
#
|
2016-01-05 21:30:59 -05:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# runner_id :integer not null
|
|
|
|
# project_id :integer
|
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
|
|
|
# gl_project_id :integer
|
2015-08-25 21:42:46 -04:00
|
|
|
#
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class RunnerProject < ActiveRecord::Base
|
|
|
|
extend Ci::Model
|
|
|
|
|
|
|
|
belongs_to :runner, class_name: 'Ci::Runner'
|
2015-12-04 06:55:23 -05:00
|
|
|
belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id
|
2015-08-25 21:42:46 -04:00
|
|
|
|
2015-12-04 06:55:23 -05:00
|
|
|
validates_uniqueness_of :runner_id, scope: :gl_project_id
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|