mirror of
https://github.com/discourse/discourse.git
synced 2025-03-05 05:06:25 +08:00

If a database exception is raised ActiveRecord will always rollback even if caught. Instead we build the query in manual SQL and DO NOTHING when there's a conflict. If we detect nothing was done, perform an update.