Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sqlalchemy datetime default now create table

from sqlalchemy.sql import func

time_created = Column(DateTime(timezone=True), server_default=func.now())
time_updated = Column(DateTime(timezone=True), onupdate=func.now())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sqlalchemy #datetime #default #create #table
ADD COMMENT
Topic
Name
8+9 =