Merge pull request #839 from hoellen/fix-create-onupdate-default

fix default value for created_at and updated_at
master
hoellen 6 years ago committed by GitHub
commit 6dea8b422a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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