rails/rails — pull request #14482 by mrbrdo (2014-03-26 08:09:52+00:00)
Title: raise ArgumentError when :uniq or :unique is used with add_column/change...

I was watching an old play by play by @tenderlove and he added a `:uniq` option to `add_column`, which of course doesn't do anything (you have to add an index). This happened to me before too, and I didn't know about it until some time later when we wrote more specs (I just assumed it works). Not sure why but it's just easy to assume that it works, perhaps because you remember the option does exist, you just forget that the option is for add_index and not add_column.

So I made add_column/change_column raise an exception if you provide uniq/unique as an option, so it does not just silently ignore this.