fix default value for created_at and updated_at

Use date instead of datetime for created_at and updated_at.
master
hoellen 6 years ago
parent fd15a5b65c
commit 9721df0bc5

@ -101,8 +101,8 @@ class Base(db.Model):
} }
) )
created_at = db.Column(db.Date, nullable=False, default=datetime.now) created_at = db.Column(db.Date, nullable=False, default=date.today)
updated_at = db.Column(db.Date, nullable=True, onupdate=datetime.now) updated_at = db.Column(db.Date, nullable=True, onupdate=date.today)
comment = db.Column(db.String(255), nullable=True) comment = db.Column(db.String(255), nullable=True)

Loading…
Cancel
Save