summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/15_award_emoji.rb6
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|