It's easy to accidentally add a date / time column with an instantiated default rather than a callable. Not that I have ever personally done this before :eyes:
Normal tests won't typically catch this, since they're run immediately after the app is initialized. It's also difficult to see in a manual QA test since the default is usually now() or today(). It's only after the application has been running for awhile that these bugs become visible, and even then, they're not always apparent.
It's easy to accidentally add a date / time column with an instantiated default rather than a callable. Not that I have ever personally done this before :eyes:
foo_date = sa.Column(sa.Date, default=datetime.date.today(), nullable=False)
Normal tests won't typically catch this, since they're run immediately after the app is initialized. It's also difficult to see in a manual QA test since the default is usually
now()
ortoday()
. It's only after the application has been running for awhile that these bugs become visible, and even then, they're not always apparent.KE should catch these in its column checks.