summaryrefslogtreecommitdiffstats
path: root/db/migrate/20091017214015_add_missing_indexes_to_members.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-10-17 22:23:29 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-10-17 22:23:29 +0000
commit70118fb136b1318843e7146ed2e31e575c884ce3 (patch)
treeec5cf6a54528c5859f8822c9e7767f013a0c83fe /db/migrate/20091017214015_add_missing_indexes_to_members.rb
parent07ffad4a7ec566be782ae6e07fb5191d7f3a771c (diff)
downloadredmine-70118fb136b1318843e7146ed2e31e575c884ce3.tar.gz
redmine-70118fb136b1318843e7146ed2e31e575c884ce3.zip
Adding missing database indexes for foreign keys and STI fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20091017214015_add_missing_indexes_to_members.rb')
-rw-r--r--db/migrate/20091017214015_add_missing_indexes_to_members.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20091017214015_add_missing_indexes_to_members.rb b/db/migrate/20091017214015_add_missing_indexes_to_members.rb
new file mode 100644
index 000000000..5fdf560fa
--- /dev/null
+++ b/db/migrate/20091017214015_add_missing_indexes_to_members.rb
@@ -0,0 +1,11 @@
+class AddMissingIndexesToMembers < ActiveRecord::Migration
+ def self.up
+ add_index :members, :user_id
+ add_index :members, :project_id
+ end
+
+ def self.down
+ remove_index :members, :user_id
+ remove_index :members, :project_id
+ end
+end