תוסף גורם לשגיאות במהלך בנייה מחדש

Well, I mostly defer to you on this, and I think we really agree. I think it’s true that the migration works if the data aren’t broken. We agree that if the data are broken it should fail more gracefully that it does now.

Yes, but the data likely were corrupted years ago (that’s the case on the site that I am familiar with), but you didn’t notice because it didn’t fail catastrophically. I’m pretty sure that it wasn’t managing the upvotes as expected, but no one noticed.

I’d do it from rails, something like this:

./launcher enter app
rails c

Then stuff like this:

all_votes=PostCustomField.where(name: "vote_history")
likely_broken_votes=PostCustomField.where(name: "vote_history").where("value like '\"%'")

Look at just the id and data:

all_votes.pluck(:id,:value)

Get just one pcf:

pcf=PostCustomField.find(1234)

Fix it

pcf.value='the stuff you really want in it'
pcf.save