On Apr 23, 11:23 pm, Mike C <[email protected]> wrote:
> I'm using the acts as taggable on plugin, and in the migrations
> there's a line of code to create an index:
>
> add_index :taggings, [:taggable_id, :taggable_type, :context], :name
> => "tagging_index", :limit => {:name => 10, :surname => 20}
>
> When I use unicode, the migration fails and I get told that the index
> is too long and can only be 1000 bytes. I switched over to ascii to
> see if I get the same problem and I didn't. I really want to use
> unicode, so I want to get this working.

If you want to limit the length of the prefix used for indexes, you'll
need to change name/surname up there for the string columns you want
to index (ie taggable_type and context) and change the numbers as
appropriate to your data

Fred
>
> I'm running Rails 3.0.7 with MySQL 5.1.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to