Skip to content
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

models: fix EventRecord default saved_at timestamp type #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 23, 2019

  1. models: fix EventRecord default saved_at timestamp type

    We used the fancy https://docs.djangoproject.com/fr/2.2/ref/contrib/postgres/functions/#transactionnow
    it returns the START of the database transaction.
    This is actually not a desirable behaviour for a `saved_at` field. We want the time
    at which it was recorded, not when the enclosing transaction begun, which may be
    an hour ago for example with a very long job.
    
    Note: I think TransactionNow would be useful if we had a timestamp to
    assess the time validity of an object. In that case, knowing when the transaction
    that wrote it started would indeed be nice.
    cedricco committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    378dab1 View commit details
    Browse the repository at this point in the history