What happened is that I overlooked the migration guides and didn't note that the syntax is only valid while changing a table. Sorry for the confusion, but I would like to take this opportunity to ask why this syntax cannot be used for creating table as well.
I think it is much cleaner than using the old (actually current too) syntax "add_index" after the table creation block.
Is that difficult to achieve?
Sorry for any confusion. I hope this is the correct list to discuss that new feature (I've even changed the message subject).
In early days I have several confusion on t.index too. As far as my knowledge go, I feel that some database engine doesn't support inline index creation so that this is the only way to do it?
Even if the database doesn't support inline index creation, I guess AR migrations could defer the index creation on these situations without altering the syntax...
But I haven't taken a look at the source, so I'm not sure if it would be easy to implement such a feature...