]> source.dussan.org Git - redmine.git/commitdiff
Fixes Repository#clear_changesets.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Sep 2008 19:35:08 +0000 (19:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Sep 2008 19:35:08 +0000 (19:35 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1783 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository.rb

index 9768e3e3c902ad2b2fbccd652bf13d71156b221f..81e6647a271c2fa288f087ec2910a682d5b83dde 100644 (file)
@@ -134,6 +134,7 @@ class Repository < ActiveRecord::Base
   
   def clear_changesets
     connection.delete("DELETE FROM changes WHERE changes.changeset_id IN (SELECT changesets.id FROM changesets WHERE changesets.repository_id = #{id})")
+    connection.delete("DELETE FROM changesets_issues WHERE changesets_issues.changeset_id IN (SELECT changesets.id FROM changesets WHERE changesets.repository_id = #{id})")
     connection.delete("DELETE FROM changesets WHERE changesets.repository_id = #{id}")
   end
 end