Permalink
Browse files

create a unique index on id in the index tables

  • Loading branch information...
1 parent 61d2e9c commit 283eb7b193c3e40a8aff957d2b0b531c4e3311e2 @jamesgolick committed Dec 17, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/friendly/table_creator.rb
@@ -35,6 +35,7 @@ def create_index_table(table)
method(table.klass.attributes[f].type.name.to_sym).call(f)
end
primary_key table.fields.flatten + [:id]
+ unique :id
end
end
end

0 comments on commit 283eb7b

Please sign in to comment.