Open lovebes opened 10 months ago
That's a good catch! I suspect adding an order during update could make it deterministic, otherwise sorting application-side is fine too.
Ah thanks for confirming! Would it be possible to edit the example in the article? The migration series of articles is imho a very important document that I refer to time and time again at work. Really appreciate the work put into the article!!
Will do!
I haven't forgotten about this. FWIW, I think adding a CTE to ensure order is the right solution (or sorting Elixir-side), just need to write the example and test it.
@dbernheisel no worries thank you! Really appreciate ThinkingElixir podcast and thanks for all the time and effort to bring quality news about Elixir to the listeners! 👍
Hi, in https://fly.io/phoenix-files/backfilling-data/#batching-deterministic-data - The code in getting the
next_page
id, this seems to imply thatRepo.update_all
would return the results in an ordered list, and in reversed order.Would that be true? I wonder if you'd need to do some sorting on the
result
to get the tail of the result?