-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ActiveRecord] upsert not updating updated_at when no changes #51771
Comments
I assume you mean 7.1.3.2? Anyway, this is configurable, see the docs: https://api.rubyonrails.org/classes/ActiveRecord/Persistence/ClassMethods.html#method-i-upsert_all you can use |
This issue has been automatically closed because there has been no follow-up response from the original author. We currently don't have enough information in order to take action. Please reach out if you have any additional information that will help us move this issue forward. |
Steps to reproduce
Expected behavior
I'm using #upsert to touch records by key and set updated_at.
upsert should update updated_at column.
Actual behavior
ON CONFLICT ("key") DO NOTHING
is used and upsert does not update updated_at.Logs:
System configuration
Rails version: 7.3.2.1
Ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
The text was updated successfully, but these errors were encountered: