Added some database indexes to commonly queried fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3206 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7955e1eb9f
commit
1ebb78e412
|
@ -0,0 +1,11 @@
|
||||||
|
class AddLftAndRgtIndexesToProjects < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_index :projects, :lft
|
||||||
|
add_index :projects, :rgt
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_index :projects, :lft
|
||||||
|
remove_index :projects, :rgt
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddIndexToSettingsName < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_index :settings, :name
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_index :settings, :name
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,13 @@
|
||||||
|
class AddIndexesToIssueStatus < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_index :issue_statuses, :position
|
||||||
|
add_index :issue_statuses, :is_closed
|
||||||
|
add_index :issue_statuses, :is_default
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_index :issue_statuses, :position
|
||||||
|
remove_index :issue_statuses, :is_closed
|
||||||
|
remove_index :issue_statuses, :is_default
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue