Repository navigation
db: Backfill existing event attachments in a migration - #15801
Merged
Merged
Conversation
Member
Author
|
tonyo
suggested changes
Nov 26, 2019
tonyo
left a comment
Contributor
There was a problem hiding this comment.
Could you figure out a way to make
| from sentry.utils.query import RangeQuerySetWrapper | ||
|
|
||
|
|
||
| def forwards(apps, schema_editor): |
Contributor
There was a problem hiding this comment.
Could you figure out a way to make this importable, so we can easily run this offline?
Member
Author
There was a problem hiding this comment.
Does the new function work for you or do you need it moved somewhere outside the migration?
Member
Author
There was a problem hiding this comment.
from sentry.models import EventAttachment
sentry = __import__("sentry.migrations.0020_auto_20191125_1420")
backfill = getattr(sentry.migrations, '0020_auto_20191125_1420').backfill_group_ids
backfill(EventAttachment)
tonyo
approved these changes
Nov 26, 2019
jan-auer
force-pushed
the
db/backfill-event-attachment-group-ids
branch
from
November 27, 2019 08:56
5be052b to
ad151e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backfills event attachments with their group id for more efficient access.
Follow-up to #15798