So I’ve got an ActiveRecord model pointing to a MySQL db, with an
auto-serialized column (“serialize :columnName”).
Thing is, MySQL, depending on how it’s configured (like, by default),
has a bad habit of just truncating your data if it’s too wide for the
column, with no error raised. Yeah, I can probably reconfigure MySQL
and/or my AR connection to it. But I’m wanting to distribute this code
to all kinds of people who won’t think of that or won’t want to do that,
I’d really like it to work with the default setup.
But obviously, if a yaml serialization gets truncated, it’s not going to
unserialize very well.
At the point of insert/update, is there any good way for me to detect
that the serialization was too big for the column, even though MySQL