Skip to content

Test updating unchanged ChangsetEvent doesn't modify database row

Warren Gifford requested to merge no-unnecessary-event-updates into master

Created by: mrnugget

We talked about this in the watercooler chat. Currently we always update the changeset_events.updated_at column, even if nothing changed.

I started to hack on this for a bit, but as it turns out: when the new WHERE clause in the the ON CONFLICT [...] doesn't evaluate to true, then the RETURNING changeset_events.* is not executed, I think.

As I understand it @ryanslade already solved this in code, not in SQL, and I only picked it up for a bit of fun hacking. If one of you wants to take over this branch: let me know.

Merge request reports

Loading