-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(releases): Add date_added column to release_project table #101343
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
base: master
Are you sure you want to change the base?
Conversation
This PR has a migration; here is the generated SQL for for --
-- Custom state/database change combination
--
ALTER TABLE "sentry_release_project" ADD COLUMN "created_at" timestamp with time zone NULL; |
…/github.com/getsentry/sentry into cmanallen/releases-track-project-added-date
project = FlexibleForeignKey("sentry.Project") | ||
release = FlexibleForeignKey("sentry.Release") | ||
new_groups = BoundedPositiveIntegerField(null=True, default=0) | ||
created_at = models.DateTimeField(default=timezone.now, null=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not use date_added
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts with existing queries which want me to explicitly label the column's origin. Changing the name is a cheap fix way to fix this.
I'm only adding this because it might help me debug customer issues. It has no purpose otherwise. So changing several sections of the code base isn't particularly exciting prospect for me. I may end up closing this pull because if its more trouble than its worth I can operate on less than complete information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand what you mean here... what code is going to change because you added a new column?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We stringly order by COALESCE(date_released, date_added)
. Where a join to release_project exists the date_added column is ambiguous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, got it... that's annoying. Probably this code can be written in a different way using modern Django so that it's not referencing the sql directly. Anyway, not a huge deal if you want to rename it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I don't need this today or even next week. So I may let this pull sit just because.
Tracking the date added would be a helpful debugging aid.