When creating a table:
create_table :cars do column :make, :text, null: false index :make, unique: true end
When modifying a table:
alter_table :cars do add_index :make end