Is possible to create Column in SQLAlchemy which is going to be automatically populated with time when it inserted/updated last time?

In Base class add onupdate in the last statement as follows:

from sqlalchemy.sql import func

last_time = Column(TIMESTAMP, server_default=func.now(), onupdate=func.current_timestamp())

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)