Hello

Le lun. 4 juil. 2022 à 09:09, 'Steven Mapes' via Django users <
[email protected]> a écrit :

> What I'd advise is to upgrade to point just before it breaks, then update
> the permission to use a different name, then upgraded to 2.2 avoiding the
> name clash. Once upgraded then edit the permission to grant the permission
> to the users who need that permission based on your now renamed custom
> permission. Then remove your custom permission.
>
> I'd do it this way so that you don't loose data on which users had that
> permission in the first place.  Or rename the permission at the start then
> upgrade.
>
> For those saying "why not upgrade to 4" there are many good reasons why
> you may not/ can not, use Django 4 at the moment such as reliance on
> unsupported 3rd party libs or, more commonly, regressions and lack of LTS.
> It's quite common for companies/projects that need stability to only
> upgrade from LTS version to LTS version as they can't risk the regressions
> that often happen in between
>
> On Sunday, 3 July 2022 at 14:16:36 UTC+1 [email protected] wrote:
>
>> Deal
>>
>>
>> Pada tanggal Min, 3 Jul 2022 03.48, Sheila Miguez <[email protected]>
>> menulis:
>>
>>> I could try that.
>>>
>>> So far I've made a toy project to reproduce the problem and made a
>>> migration in 1.11 to remove the permission. When I started it up in 2.2 it
>>> suddenly said I had unapplied migrations in admin and auth.
>>>
>>> I don't know if renaming would have the same effect. I'll try it.
>>>
>>> On Friday, July 1, 2022 at 11:35:02 AM UTC-5 Jason wrote:
>>>
>>>> Joel Goldstick, would definitely not recommend doing an all in one
>>>> update.  That'd be like going from windows XP to 10 in one go.  For
>>>> personal projects, you could do it, but would side-eye any professional who
>>>> suggested doing this with a company or workplace project.
>>>>
>>>>
>>>> https://docs.djangoproject.com/en/4.0/releases/2.1/#model-view-permission 
>>>> is
>>>> liekly the permission being hit.  OP, would it be possible for you to
>>>> rename the original permission name in a migration in 1.11, and then move
>>>> forward with the migration?
>>>>
>>>>
>>>> On Friday, July 1, 2022 at 9:35:31 AM UTC-4 [email protected] wrote:
>>>>
>>>>> > What do I do about this? Clearly I should remove the permission I
>>>>> created. How do I deal with the migration? Should I remove the permission
>>>>> while I run the app as Django 1.11 before moving on to a 2.2 environment?
>>>>>
>>>>> You could rename the current view_inventorychangelog record with a
>>>>> data migration to avoid the constraint, upgrade to 2.2, and then move any
>>>>> references to the old DB record to the new using a data migration.
>>>>>
>>>>> > Sorry, I can't answer your question. But, I am wondering why you are
>>>>> > upgrading to a very out of date version of Django that is no longer
>>>>> > supported. I think 3.2 is the oldest supported version. Why not
>>>>> > upgrade to 4?
>>>>>
>>>>> The options for uplifting severely out of date projects are to either
>>>>> step-by-step migrate through older versions, or rewrite in the target
>>>>> version.
>>>>>
>>>>> Cheers,
>>>>> Michael Manfre
>>>>>
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/cdfce75a-6bb1-4d1b-81a5-a03785cdddb4n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/cdfce75a-6bb1-4d1b-81a5-a03785cdddb4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ef92d745-6cb1-41c2-9285-f4c0722759a3n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ef92d745-6cb1-41c2-9285-f4c0722759a3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPaoOk_R_%3DcP7H7B2ejM3WRwz4%2BzzHCuZ084OLrt6n_QaR_KJw%40mail.gmail.com.

Reply via email to