-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't save all fields of a model when bumping the update date
Instead, use a specialized method that only changes the date. This provides the following advantages: * Prevents the date updates from overwriting updates to other fields that may happen at the same time. * Possibly makes the updates more efficient due to fewer columns being updated (I have no data on this, though). * Makes it easier to recognize the purpose of the query when analyzing logs/live statistics. * Makes the purpose of the code more obvious. The name of the method references the standard POSIX touch utility.
- Loading branch information
Showing
4 changed files
with
16 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters