pablobm left a comment (openstreetmap/openstreetmap-website#7213)

There was also a question about whether a full-table UPDATE was appropriate or 
it should be done in batches instead.

I'm ok with either. I tend to avoid using models in migrations, in the event 
that they are run again in a future where those models don't exist any more, 
but that doesn't appear to be a rule here and it's not a big deal anyway.

If we did it, in order to do it 100% properly we would need to do it in a third 
migration, running in between the two existing ones. This is because migrations 
run within their own transaction, so the batches don't help. This new migration 
would run outside a transaction, with `disable_ddl_transaction!`, see 
https://github.com/ankane/strong_migrations#backfilling-data

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7213#issuecomment-4894503176
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/7213/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to