From e06616e89a102c43b16a70a059fca70a7d74553f Mon Sep 17 00:00:00 2001 From: Michael Hartl Date: Fri, 17 Dec 2010 18:42:38 -0800 Subject: [PATCH] Made a unique index for relationships --- db/migrate/20100831012055_create_relationships.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/migrate/20100831012055_create_relationships.rb b/db/migrate/20100831012055_create_relationships.rb index 382a665..a0fcddf 100644 --- a/db/migrate/20100831012055_create_relationships.rb +++ b/db/migrate/20100831012055_create_relationships.rb @@ -8,6 +8,7 @@ def self.up end add_index :relationships, :follower_id add_index :relationships, :followed_id + add_index :relationships, [:follower_id, :followed_id], :unique => true end def self.down