Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

migrations for add_index and remove_index don't match

#569

Looking at the documentation here -> http://api.rubyonrails.org/class...

Says:

  1. add_index(table_name, column_names, options): Adds a new index with the name of the column. Other options include :name and :unique (e.g. { :name => "users_name_index", :unique => true }).
  2. remove_index(table_name, index_name): Removes the index specified by index_name.

The documentation for remove_index is misleading. It implies that if you've added an index with add_index and supplied :name, then you use that :name in remove_index to remove the index. This isn't true.

If you add_index for :table, :column, you can remove_index for :table, :column - but not :table, :index_name

Reported by Tim Haines · July 7th, 2008 @ 11:54 PM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to invalid

    July 16th, 2008 @ 11:40 PM

  2. Pratik
    Pratik

    PM me (lifo) at Github and I'll give you access to docrails.

    July 16th, 2008 @ 11:41 PM

  3. Tim Haines
    Tim Haines

    Did you mark it as invalid simply because it relates to documentation?

    July 16th, 2008 @ 11:43 PM

  4. Pratik
    Pratik

    Yeah, basically, commit the doc changes yourself to docrails :)

    July 16th, 2008 @ 11:51 PM

  5. Tim Haines
    Tim Haines

    Have you moved the ticket to another issue tracker?

    I don't know whether this ticket should result in a change of documentation or a change of the way the documented features work. I think it would be nice if the documentation stayed the way it was and the code was updated to work as the documentation suggests. I don't have time to write a patch at the moment tho.

    I think it's a bad idea to close tickets that are known problems without them being resolved. Even if they are documentation issues. I'd guess there's been some discussion about this somewhere though? Got a link?

    July 16th, 2008 @ 11:57 PM

  6. Pratik
    Pratik

    Please continue the discussion in rails-core mailing list. If there is an agreement there, I'll re-open.

    Thanks.

    July 17th, 2008 @ 12:40 AM