Default order by timestamp to ensure early versions are cleaned#701
Default order by timestamp to ensure early versions are cleaned#701jaredbeck merged 1 commit intopaper-trail-gem:masterfrom
Conversation
|
Very nice. Personally I find ordering by ID more reliable since timestamps can end up equal. |
|
How about |
|
Sure, that fixes the equality problem. Does it have a benefit over sorting by id only? |
|
If someone changed the assignment of IDs in their database I could see it being a problem, but having checked it looks like the table will always be created with monotonically-increasing IDs. @jaredbeck, any preference? |
|
The documentation for the
Can you add something about how the one that's kept is the most recent? For the sort order, I'd suggest Finally, please add a line to the changelog, under 5.0.0 -> Fixed. Thanks! |
|
Done. |
Default order by timestamp to ensure early versions are cleaned
|
Thanks! |
|
I believe we need should update this to use |
|
Made the aforementioned update: c200721 |
|
Thanks Ben. Good catch. |
Addresses #699: 'cleaner' intermittently fails to keep the latest version because the query assumes but does not enforce chronological order. Postgresql exposes the assumption by failing the tests but not 100% of the time.
I had considered ordering by
idinstead oftimestampbut was unsure about the reliability of that approach.