warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

Add 'created' column to all DB models

Open di opened this issue 3 years ago • 1 comments

We've got a fair amount of duplication on the created column for models that support it, and a number of tables that are missing a created column entirely.

This PR attempts to ensure all current and future models/rows have a created field/column by default.

Note that this unsets nullable=False as we can't backfill creation dates for models that don't already have the field, but also sets a default, so these should never be null going forward.

di avatar Sep 14 '22 17:09 di

Should we also consider another column?

updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)

miketheman avatar Sep 15 '22 02:09 miketheman