diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-15 12:10:41 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-15 12:10:41 +0200 |
commit | b2df11856144e91c84f51e8934e10e21f4f3fa70 (patch) | |
tree | 354b497c7d381394e8d1b80902ccff53a69524f2 /db | |
parent | 7dc08033b9cbd2876ed444878525d9f8bbfcef64 (diff) | |
download | gitlab-ce-b2df11856144e91c84f51e8934e10e21f4f3fa70.tar.gz |
Random selection now also works for MySQLseed-fu-award-emoji
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/15_award_emoji.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/fixtures/development/15_award_emoji.rb b/db/fixtures/development/15_award_emoji.rb index 1db10f5f0b6..baac32f2d10 100644 --- a/db/fixtures/development/15_award_emoji.rb +++ b/db/fixtures/development/15_award_emoji.rb @@ -1,7 +1,7 @@ Gitlab::Seeder.quiet do emoji = Gitlab::AwardEmoji.emojis.keys - issue_count = Issue.count / 2 - Issue.order("RANDOM()").limit(Issue.count / 2).each do |issue| + + Issue.order(Gitlab::Database.random).limit(Issue.count / 2).each do |issue| project = issue.project project.team.users.sample(2).each do |user| @@ -16,7 +16,7 @@ Gitlab::Seeder.quiet do end end - MergeRequest.order("RANDOM()").limit(MergeRequest.count / 2).each do |mr| + MergeRequest.order(Gitlab::Database.random).limit(MergeRequest.count / 2).each do |mr| project = mr.project project.team.users.sample(2).each do |user| |