diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 17:17:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 17:17:10 +0000 |
commit | 8cc519e7637d463462e8c8298669fddeaabacb49 (patch) | |
tree | 9ceca6e42ba36176b96d96e70b3433c6731cd532 /db/migrate/20100313171051_add_index_on_issues_nested_set.rb | |
parent | 508df4a33acba2cc65e141ad9620098316674e7b (diff) | |
download | redmine-8cc519e7637d463462e8c8298669fddeaabacb49.tar.gz redmine-8cc519e7637d463462e8c8298669fddeaabacb49.zip |
Adds index on issues nested set columns.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3578 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20100313171051_add_index_on_issues_nested_set.rb')
-rw-r--r-- | db/migrate/20100313171051_add_index_on_issues_nested_set.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20100313171051_add_index_on_issues_nested_set.rb b/db/migrate/20100313171051_add_index_on_issues_nested_set.rb new file mode 100644 index 000000000..4dc948000 --- /dev/null +++ b/db/migrate/20100313171051_add_index_on_issues_nested_set.rb @@ -0,0 +1,9 @@ +class AddIndexOnIssuesNestedSet < ActiveRecord::Migration + def self.up + add_index :issues, [:root_id, :lft, :rgt] + end + + def self.down + remove_index :issues, [:root_id, :lft, :rgt] + end +end |