edited comment on created_datetimez
This commit is contained in:
parent
365f15eac7
commit
c67a3d2b95
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,8 @@ class CreatedDateTimeBase(Base):
|
|||
@declared_attr
|
||||
def created_datetimez(self):
|
||||
"""
|
||||
Declare default column for classes/tables inheriting `CreatedDateTimeBase`.
|
||||
|
||||
Retrieving `created_datetimez` will return a `datetime` object with `tzinfo` for UTC.
|
||||
"""
|
||||
return Column(DateTime(timezone=True), nullable=False, server_default=text("now()"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue