gitlab-org--gitlab-foss/app/models/ci
Stan Hu 8ddb00adbf Ensure CI pipelines and builds have the correction project associations
This should reduce the number of SQL queries and lookups needed to look up a
project of a build and pipeline and vice versa.

Before:

```
[1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
=> false
[2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
=> false
[3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
=> false
[4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
=> :project
```

After:

```
[1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
=> :builds
[2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
=> :project
[3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
=> :pipelines
[4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
=> :project
```
2018-01-14 08:11:51 -08:00
..
artifact_blob.rb
build.rb Ensure CI pipelines and builds have the correction project associations 2018-01-14 08:11:51 -08:00
build_trace_section.rb
build_trace_section_name.rb
group.rb
group_variable.rb
job_artifact.rb
legacy_stage.rb
pipeline.rb Ensure CI pipelines and builds have the correction project associations 2018-01-14 08:11:51 -08:00
pipeline_schedule.rb
pipeline_schedule_variable.rb
pipeline_variable.rb
runner.rb
runner_project.rb
stage.rb
trigger.rb
trigger_request.rb
variable.rb