updated_at should have utcnow() onupdate, not now()

This commit is contained in:
Fabio Manganiello 2022-04-30 01:48:55 +02:00
parent d29b377cf1
commit 7df67aca82
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -44,7 +44,7 @@ class Entity(Base):
DateTime(timezone=False), default=datetime.utcnow(), nullable=False
)
updated_at = Column(
DateTime(timezone=False), default=datetime.utcnow(), onupdate=datetime.now()
DateTime(timezone=False), default=datetime.utcnow(), onupdate=datetime.utcnow()
)
UniqueConstraint(external_id, plugin)