From: Jean-Philippe Lang Date: Thu, 4 Sep 2008 19:35:08 +0000 (+0000) Subject: Fixes Repository#clear_changesets. X-Git-Tag: 0.8.0-RC1~262 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4b9df2eac774aa045aa5207c8bc613ed6ca67d42;p=redmine.git Fixes Repository#clear_changesets. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1783 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/repository.rb b/app/models/repository.rb index 9768e3e3c..81e6647a2 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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