ankit1997 / pagure

Forked from pagure 7 years ago
Clone

4bfb38a Do not automatically update the last_updated or updated_on fields

Authored and Committed by pingou 7 years ago
    Do not automatically update the last_updated or updated_on fields
    
    Turns out that there are a few cases where to adjust the data in the
    database and we do not need/want the user to know it changed.
    One classic example: merge status are stored in the database. When a
    pull-request is merged, the merge status of all the open pull-request
    is cleared.
    Before this commit, it meant that suddenly all the open pull-request had
    their updated_on field updated to the current time, while in practice
    nothing changed for this PR.
    
    Since we are manually updating this field where we want, in this commit
    we are removing the feature updating the data automatically.
    And bonus point, it turns out this does not need an alembic migration
    since this onupdate is not stored in the database itself, it is in fact
    a feature of SQLAlchemy.
    
        
file modified
+2 -4