rails3: t.index in migrations not working anymore


I'm playing around with Rails3 and trying to upgrade one of my applications to Rails 3.0.0.rc and I get an error which should be still working.

Migration: t.index :name

When I execute rake: rake aborted! An error has occurred, all later migrations canceled:

undefined method `index' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x4b2b6b0>

Does some one know what's wrong here?

I've always used add_index(table_name, column_names). My guess is that t.index was deprecated.

just use

add_index :your_table_name, :name

after your create_table block