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 /lib | |
parent | 7dc08033b9cbd2876ed444878525d9f8bbfcef64 (diff) | |
download | gitlab-ce-b2df11856144e91c84f51e8934e10e21f4f3fa70.tar.gz |
Random selection now also works for MySQLseed-fu-award-emoji
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/database.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index 04fa6a3a5de..d76ecb54017 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -30,6 +30,10 @@ module Gitlab order end + def self.random + Gitlab::Database.postgresql? ? "RANDOM()" : "RAND()" + end + def true_value if Gitlab::Database.postgresql? "'t'" |