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

populate release organizations and projects #4631

Merged
merged 3 commits into from
Dec 13, 2016
Merged

populate release organizations and projects #4631

merged 3 commits into from
Dec 13, 2016

Conversation

macqueen
Copy link
Contributor

@macqueen macqueen commented Dec 3, 2016

relies on #4627 (will switch to merge into master once that pr has been merged)

cc @benvinegar @kjlundsgaard

qs = orm.Release.objects.all().select_related('project')
for r in RangeQuerySetWrapperWithProgressBar(qs):
r.organization_id = r.project.organization_id
r.save()
Copy link
Contributor

@mattrobenolt mattrobenolt Dec 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to:

orm.Release.objects.filter(id=r.id).update(organization_id=r.project.organization_id)


def backwards(self, orm):
"Write your backwards methods here."
for r in orm.Release.objects.all():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I'd just remove this. There's literally no rolling back ever.

@macqueen macqueen changed the base branch from org-releases to master December 8, 2016 19:48
@macqueen macqueen changed the base branch from master to org-releases December 8, 2016 19:51
@macqueen macqueen force-pushed the org-releases-2 branch 2 times, most recently from 292d67b to 8cd7146 Compare December 8, 2016 20:25
@macqueen macqueen changed the base branch from org-releases to master December 8, 2016 20:25
@getsentry-bot
Copy link
Contributor

getsentry-bot commented Dec 12, 2016

1 Warning
⚠️ Big PR – consider splitting it up into multiple changesets

Generated by 🚫 danger

use update in migration, remove backwards migration
Copy link
Contributor

@mattrobenolt mattrobenolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎

@macqueen macqueen merged commit d756dd9 into master Dec 13, 2016
@macqueen macqueen deleted the org-releases-2 branch December 13, 2016 18:49
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants