Migration strategy for proxy model permissions to use their own content type

81 views
Skip to first unread message

Arthur Rio

unread,
Nov 26, 2018, 10:10:18 AM11/26/18
to Django developers (Contributions to Django itself)
Hi all,

I have been working on a 9 years old ticket that I'd like to close once and for all. The outstanding question is about the migration path to choose in order to update existing proxy model permissions. I have explained three different approaches I can think of in the pull request: https://github.com/django/django/pull/10381#issuecomment-435534644

I have implemented the first option and wrote the release notes explaining what to expect for users upgrading: https://github.com/django/django/pull/10381/files#diff-1f22a5c1d6164c6de8defb36f3829138.

Carlton, who has been the main reviewer, suggested to contact the mailing list for further review in order to catch any red flag and make sure we have general consensus on the chosen approach. 

Regards.

Arthur

Aymeric Augustin

unread,
Jan 6, 2019, 4:04:25 PM1/6/19
to django-d...@googlegroups.com
Hello Arthur,

I agree that option 1 is the way to go.

It would be nice to make the migration reversible. If someone upgrades to Django 2.2.x, migrates the database, and later discovers a blocking issue, they should have the option to migrate backwards and downgrade to 2.1.y.

Best regards,

-- 
Aymeric.



--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f3298dbb-e072-4815-944c-2250d0b4d3a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arthur Rio

unread,
Jan 7, 2019, 8:29:52 AM1/7/19
to Aymeric Augustin, django-d...@googlegroups.com
Thank you for your feedback Aymeric,

I have added the backward migration method + tests per your suggestion: https://github.com/django/django/pull/10381/commits/d5c4a4b08ccee9239e5117df4c788a5a7a2f60a9

Regards


Arthur
Reply all
Reply to author
Forward
0 new messages