-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Standarize timestamp fields #4864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yea, we should just have a subclass that standardizes these fields, and everything inherits from. |
I can probably implement it in #4850 |
Actually, I don't want to hold up that PR on this design decision, and we'll require code migrations anyways, so I'll hold off until we decide on names, etc. |
Considering that we are already using
When implementing this, we will need a migration that migrate the old datetimes values from old fields name to the new names. |
Can i work on this? and does all models needs to inherits from
and i didn't get the meaning of this line, does it mean to provide the update migrations file?? |
okay, I get it. |
You should be able to just do the |
@ericholscher |
I think we shouldn't do every model, but just those that have either an updated or modified time. Maybe it makes sense to do an audit of them. |
I believe some parts of the data are also exposed in public API's (eg. the Build object) so I'm not sure the best migration path for some of this stuff. |
Since it's a read-only field on just a couple models in the v2 API, worst case we can just use a SerializerMethodField. |
Can this be made more clear as what needs to be done. |
My proposal to solve this issue is (in this order):
After that, all the tests should pass and everything should continue working properly. |
Currently, we have
pub_date
,date
,modified_date
,add_date
,created_dt
andupdated_dt
.I suggest to use
created_at
andupdated_at
for all the models.This is useful for #4286
The text was updated successfully, but these errors were encountered: