summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-20 15:06:54 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-09-20 16:05:25 +0530
commit8957293d9bd0d711db3af26182205c2fe4125194 (patch)
treedcdd25393e2d6248971fddbd6c9eac30fe27ff6e /db/fixtures
parentfa890604aaf15b9e4f0199e6a4cff24c29955a37 (diff)
downloadgitlab-ce-8957293d9bd0d711db3af26182205c2fe4125194.tar.gz
Implement review comments from @yorickpeterse
1. Change multiple updates to a single `update_all` 2. Use cascading deletes 3. Extract an average function for the database median. 4. Move database median to `lib/gitlab/database` 5. Use `delete_all` instead of `destroy_all` 6. Minor refactoring
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index f51d28d9ebf..e882a492757 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -4,7 +4,7 @@ require './spec/support/test_env'
class Gitlab::Seeder::CycleAnalytics
def initialize(project, perf: false)
@project = project
- @user = User.find(1)
+ @user = User.order(:id).last
@issue_count = perf ? 1000 : 5
stub_git_pre_receive!
end