2222from typing import Optional
2323import uuid
2424
25- from google .genai import types
2625from sqlalchemy import Boolean
2726from sqlalchemy import delete
2827from sqlalchemy import Dialect
@@ -132,9 +131,11 @@ class StorageSession(Base):
132131 MutableDict .as_mutable (DynamicJSON ), default = {}
133132 )
134133
135- create_time : Mapped [DateTime ] = mapped_column (DateTime (), default = func .now ())
136- update_time : Mapped [DateTime ] = mapped_column (
137- DateTime (), default = func .now (), onupdate = func .now ()
134+ create_time : Mapped [datetime ] = mapped_column (
135+ PreciseTimestamp , default = func .now ()
136+ )
137+ update_time : Mapped [datetime ] = mapped_column (
138+ PreciseTimestamp , default = func .now (), onupdate = func .now ()
138139 )
139140
140141 storage_events : Mapped [list [StorageEvent ]] = relationship (
@@ -313,8 +314,8 @@ class StorageAppState(Base):
313314 state : Mapped [MutableDict [str , Any ]] = mapped_column (
314315 MutableDict .as_mutable (DynamicJSON ), default = {}
315316 )
316- update_time : Mapped [DateTime ] = mapped_column (
317- DateTime () , default = func .now (), onupdate = func .now ()
317+ update_time : Mapped [datetime ] = mapped_column (
318+ PreciseTimestamp , default = func .now (), onupdate = func .now ()
318319 )
319320
320321
@@ -332,8 +333,8 @@ class StorageUserState(Base):
332333 state : Mapped [MutableDict [str , Any ]] = mapped_column (
333334 MutableDict .as_mutable (DynamicJSON ), default = {}
334335 )
335- update_time : Mapped [DateTime ] = mapped_column (
336- DateTime () , default = func .now (), onupdate = func .now ()
336+ update_time : Mapped [datetime ] = mapped_column (
337+ PreciseTimestamp , default = func .now (), onupdate = func .now ()
337338 )
338339
339340
0 commit comments