db-api-review: no oslo code uses created_at/updated_at fields
Bug #1119702 reported by
Mark McLoughlin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Low
|
Zhongyue Luo |
Bug Description
See https:/
It looks like these fields:
class ModelBase(object):
...
created_at = Column(DateTime, default=
updated_at = Column(DateTime, onupdate=
aren't actually set by any code in Oslo. Does it make sense to move these to an optional base class? Does it make sense to add common code for updating them?
Changed in oslo: | |
assignee: | nobody → Zhongyue Luo (zyluo) |
Changed in oslo: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | havana-1 → 2013.2 |
To post a comment you must log in.
I'll take a shot at this. eMixin?
It seems not all projects are using those fields and in fact some do not wish to update the updated_at field automatically.
In order to put oslo.db code in all projects I think created_at and updated_at should be in a DatetimeMixin (I'm not sure this is the perfect name) class.
Maybe there should be a DatetimeMixin and a OnUpdateDatetim
What would be a good name for these mixins? suggestions?