Skip to content
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

Extend the default "created" field on models from DateField to DateTimeField #8463

Closed
jeremystretch opened this issue Jan 26, 2022 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

jeremystretch commented Jan 26, 2022

NetBox version

v3.1.6

Feature type

Change to existing functionality

Proposed functionality

All change-logged models in NetBox have two common fields:

created = models.DateField(auto_now_add=True)
last_updated = models.DateTimeField(auto_now=True)

This issue proposes migrating the created field to a DateTimeField to match last_updated. (In doing so, existing date values will receive a 00:00:00 timestamp.)

Use case

Provides greater granularity concerning the time at which an object in NetBox is created.

Database changes

Simple migration of the created field on all relevant models.

External dependencies

No response

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 26, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Feb 8, 2022
@jeremystretch jeremystretch added this to the v3.2 milestone Feb 8, 2022
@jeremystretch jeremystretch self-assigned this Feb 8, 2022
jeremystretch added a commit that referenced this issue Feb 8, 2022
This was referenced Apr 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant