summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/migrate/20101104182107_add_unique_index_on_members.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20101104182107_add_unique_index_on_members.rb b/db/migrate/20101104182107_add_unique_index_on_members.rb
index ac51313b1..14d1585f7 100644
--- a/db/migrate/20101104182107_add_unique_index_on_members.rb
+++ b/db/migrate/20101104182107_add_unique_index_on_members.rb
@@ -11,7 +11,7 @@ class AddUniqueIndexOnMembers < ActiveRecord::Migration
" WHERE m.id > (SELECT min(m1.id) FROM #{Member.table_name} m1 WHERE m1.user_id = m.user_id AND m1.project_id = m.project_id)").each do |i|
Member.delete_all(["id = ?", i])
end
-
+
# Then add a unique index
add_index :members, [:user_id, :project_id], :unique => true
end