update时更新与否
作者:互联网
add_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
add_time = Column(db.TIMESTAMP(True), nullable=False, server_default=text('CURRENT_TIMESTAMP'))
update_time = Column(db.TIMESTAMP(True), nullable=False)
标签:DEFAULT,TIMESTAMP,update,更新,CURRENT,与否,time,NULL 来源: https://blog.csdn.net/love_parents/article/details/118913347