Mercurial > hg > soundsoftware-site
diff db/migrate/20090312194159_add_projects_trackers_unique_index.rb @ 1295:622f24f53b42 redmine-2.3
Update to Redmine SVN revision 11972 on 2.3-stable branch
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:02:21 +0100 |
parents | 513646585e45 |
children |
line wrap: on
line diff
--- a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb Fri Jun 14 09:01:12 2013 +0100 +++ b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb Fri Jun 14 09:02:21 2013 +0100 @@ -10,7 +10,7 @@ # Removes duplicates in projects_trackers table def self.remove_duplicates - Project.find(:all).each do |project| + Project.all.each do |project| ids = project.trackers.collect(&:id) unless ids == ids.uniq project.trackers.clear