diff options
author | Robert Speicher <robert@gitlab.com> | 2015-10-19 14:49:31 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-10-19 14:52:49 +0300 |
commit | c4a20e61babf5a4665375f87c828277b5881631d (patch) | |
tree | 5de290b4d0360c4c1bf1a4765d3d12024a9895d0 /db/fixtures | |
parent | 592d1b3190f5d26cc886a5bb599663ade1ca909e (diff) |
Merge branch 'index-milestone-title-label' into 'master'
Improve performance when filtering on milestone on labels
Also some minor refactoring in the seeding.
See merge request !1587
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/05_users.rb | 4 | ||||
-rw-r--r-- | db/fixtures/development/07_milestones.rb | 2 | ||||
-rw-r--r-- | db/fixtures/development/09_issues.rb | 2 | ||||
-rw-r--r-- | db/fixtures/development/12_snippets.rb | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/db/fixtures/development/05_users.rb b/db/fixtures/development/05_users.rb index 378354efd5a..03da29c4c68 100644 --- a/db/fixtures/development/05_users.rb +++ b/db/fixtures/development/05_users.rb @@ -1,5 +1,5 @@ Gitlab::Seeder.quiet do - (2..20).each do |i| + 20.times do |i| begin User.create!( username: FFaker::Internet.user_name, @@ -15,7 +15,7 @@ Gitlab::Seeder.quiet do end end - (1..5).each do |i| + 5.times do |i| begin User.create!( username: "user#{i}", diff --git a/db/fixtures/development/07_milestones.rb b/db/fixtures/development/07_milestones.rb index a43116829d9..e028ac82ba3 100644 --- a/db/fixtures/development/07_milestones.rb +++ b/db/fixtures/development/07_milestones.rb @@ -1,6 +1,6 @@ Gitlab::Seeder.quiet do Project.all.each do |project| - (1..5).each do |i| + 5.times do |i| milestone_params = { title: "v#{i}.0", description: FFaker::Lorem.sentence, diff --git a/db/fixtures/development/09_issues.rb b/db/fixtures/development/09_issues.rb index c636e96381c..4fa572fca9b 100644 --- a/db/fixtures/development/09_issues.rb +++ b/db/fixtures/development/09_issues.rb @@ -1,6 +1,6 @@ Gitlab::Seeder.quiet do Project.all.each do |project| - (1..10).each do |i| + 10.times do issue_params = { title: FFaker::Lorem.sentence(6), description: FFaker::Lorem.sentence, diff --git a/db/fixtures/development/12_snippets.rb b/db/fixtures/development/12_snippets.rb index 3bd4b442ade..74898544a69 100644 --- a/db/fixtures/development/12_snippets.rb +++ b/db/fixtures/development/12_snippets.rb @@ -22,7 +22,7 @@ class Member < ActiveRecord::Base end eos - (1..50).each do |i| + 50.times do |i| user = User.all.sample PersonalSnippet.seed(:id, [{ |