According to Rails API, it is possible to write something like:
create_table :my_table do |t|
t.index :login, unique: true
But I'm getting the following error:
undefined method `index' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x00000000efd7d8>
Is this a bug or is the API outdated? Or maybe, I'm doing something wrong...
Thanks in advance,
P.S: I'm testing in SQLite3.