From f840c97a5fab6669688ee639c69421314a05059b Mon Sep 17 00:00:00 2001 From: Melissa Autumn Date: Tue, 23 Apr 2024 13:52:55 -0700 Subject: [PATCH] Let's just try some defaults --- backend/src/appointment/database/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/appointment/database/models.py b/backend/src/appointment/database/models.py index e04d1c708..2c58241cd 100644 --- a/backend/src/appointment/database/models.py +++ b/backend/src/appointment/database/models.py @@ -91,8 +91,8 @@ def touch(self): """Updates the time_updated field with the current datetime. This function does not save the model!""" self.time_updated = datetime.datetime.now() - time_created = Column(DateTime, server_default=func.now(), index=True) - time_updated = Column(DateTime, server_default=func.now(), onupdate=func.now(), index=True) + time_created = Column(DateTime, server_default=func.now(), default=func.now(), index=True) + time_updated = Column(DateTime, server_default=func.now(), default=func.now(), onupdate=func.now(), index=True) class Subscriber(Base):