home

rails dont like long names

My database migration kept failing, and I couldn’t figure out why:

== WhoIsTheWiseAssWhoMadeTypeForTableAnIntegerInsteadofAStringEh: migrating ==
– change_column(:memails, :type, :string) -> 0.0138s rake aborted!
negative argument

Turns out, that name was too long.  Maybe I shouldn’t try to be so funny in my code.

This table was a Single Table Inheritance in Rails, with a type column incorrectly set to int instead of a string.

p.s. the wise ass was me.

Leave a Reply

Type the word "seebq" here: