warehouse
warehouse copied to clipboard
Add 'created' column to all DB models
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.
Should we also consider another column?
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)