From c09df1341fef5634bfd802b732cd40c98fede122 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 21 Jan 2025 22:50:15 +0100 Subject: [PATCH] fix: fixed migration issue --- creyPY/fastapi/models/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/creyPY/fastapi/models/base.py b/creyPY/fastapi/models/base.py index 0cce6e5..40574b6 100644 --- a/creyPY/fastapi/models/base.py +++ b/creyPY/fastapi/models/base.py @@ -16,8 +16,8 @@ class Base: created_at = Column(DateTime(timezone=True), server_default=func.now()) updated_at = Column( DateTime(timezone=True), - default=lambda: datetime.now(timezone.utc), - onupdate=lambda: datetime.now(timezone.utc), + server_default=func.now(), + onupdate=func.now(), ) created_by_id = Column(String)