In for example MySQL you must set subkey length when you create an index that includes a TEXT or BLOB column:
CREATE INDEX users_text_column_index ON users (text_column(20));
In for example PostgreSQL you dont have to:
CREATE INDEX users_text_column_index ON users (text_column);
If you use MySQL and still want to use TEXT or BLOB columns in your index you cant use rails own schema definition language, or at least not with a lot of hassle.
Therefore I created this little patch, try it out and see if it fits :)
(I have not tested it as a patch! I have only created a plugin that does the same thing, and it works beautifully. Then I wanted to share it with the rest of the rails community, so I just copied the code to a fresh svn checkout and hoped for the best. If you absolutely wont test it yourself without me having tested it in this form beforehand, then Ill do it, though I bet you want to test it yourselves before accepting it anyway :)