We recently used lhm to change the collation of a large table with a unique index. Some rows got lost in the migration, just emitting a warning like Unexpected warning found for inserted row: Duplicate entry 'bjørn' for key 'lhmn_users.index_users_on_username'.
raise_on_warnings defaults to false here -
|
@raise_on_warnings = options.fetch(:raise_on_warnings, false) |
- which is a surprising default to me.
It looks like it used to always raise, before it was made configurable in c8c6b38 Oh, scratch that. The pull request introducing the warning-check is #100 - before then, I guess these would have just been silently ignored and not even logged.
I can make a PR unless you think there's a good reason it defaults to false..?
We recently used lhm to change the collation of a large table with a unique index. Some rows got lost in the migration, just emitting a warning like
Unexpected warning found for inserted row: Duplicate entry 'bjørn' for key 'lhmn_users.index_users_on_username'.raise_on_warnings defaults to false here -
lhm/lib/lhm/chunker.rb
Line 25 in 3374b60
It looks like it used to always raise, before it was made configurable in c8c6b38Oh, scratch that. The pull request introducing the warning-check is #100 - before then, I guess these would have just been silently ignored and not even logged.I can make a PR unless you think there's a good reason it defaults to false..?