summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-21 14:40:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-21 14:40:00 +0000
commit93bcc68017833096ad8080f1a2b67b87c6fc6466 (patch)
tree0d2bb9d8a132e7860c1c1d9abd9bbda81123df7c
parent24ec3bb7a94cbcf7ae7ea0e5aa679514d174642d (diff)
downloadredmine-93bcc68017833096ad8080f1a2b67b87c6fc6466.tar.gz
redmine-93bcc68017833096ad8080f1a2b67b87c6fc6466.zip
Adds a missing index (speeds up changesets loading).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3471 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--db/migrate/20100221100219_add_index_on_changesets_scmid.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20100221100219_add_index_on_changesets_scmid.rb b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb
new file mode 100644
index 000000000..96d85a3a7
--- /dev/null
+++ b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb
@@ -0,0 +1,9 @@
+class AddIndexOnChangesetsScmid < ActiveRecord::Migration
+ def self.up
+ add_index :changesets, [:repository_id, :scmid], :name => :changesets_repos_scmid
+ end
+
+ def self.down
+ remove_index :changesets, :name => :changesets_repos_scmid
+ end
+end