What about third party apps?

It would be great to migrate every AutoField to BigAutoField without the need 
to specify them manually.


--
Caio



> On 18 Jun 2020, at 09:40, Adam Johnson <m...@adamj.eu> wrote:
> 
> Would we be able to provide instructions on how to migrate from SIGNED INT to 
> UNSIGNED BIG INT? Perhaps a management command that outputs SQL like 
> sqlmigrate?
> 
> It would only be needed to add this to the model:
> id = BigAutoField() 
> 
> Then migrations would pick it up, because the field is no longer auto_created.
> 
> On Thu, 18 Jun 2020 at 13:24, Caio Ariede <caio.ari...@gmail.com 
> <mailto:caio.ari...@gmail.com>> wrote:
> 
>> On 17 Jun 2020, at 16:56, Adam Johnson <m...@adamj.eu 
>> <mailto:m...@adamj.eu>> wrote:
>> 
>> I think special casing the migrations framework is an avenue to explore, so 
>> I created this today and to my surprise it seems to work quite well: 
>> https://github.com/orf/django/commit/0a335f208cee1376c25eff55c6f866de122c7839
>>  
>> <https://github.com/orf/django/commit/0a335f208cee1376c25eff55c6f866de122c7839>.
>> 
>> That is a pretty neat solution. I think it would work quite well.
> 
> I really like that solution as well, it’s pretty fair :)
> 
> 
>> 
>> What about a way to warn users approaching the limit? I think a database 
>> check that detects AutoFields where the next ID is >50% of the way through 
>> would be a good solution. That's the kind of monitoring I've built in the 
>> past.
>> 
>> (50% might sound like it's near the limit, but the table is growing with an 
>> exponential curve, even quite shallow, it's quite close in terms of time.)
>> 
> 
> I think this is indeed a good to have.
> 
> Would we be able to provide instructions on how to migrate from SIGNED INT to 
> UNSIGNED BIG INT? Perhaps a management command that outputs SQL like 
> sqlmigrate?
> 
> 
> --
> Caio
> 
> -- 
> 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-developers+unsubscr...@googlegroups.com 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/5ECD26CA-339E-4954-A0BA-E7D8296E6988%40gmail.com
>  
> <https://groups.google.com/d/msgid/django-developers/5ECD26CA-339E-4954-A0BA-E7D8296E6988%40gmail.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> Adam
> 
> -- 
> 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-developers+unsubscr...@googlegroups.com 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/CAMyDDM0W-8ywE%3D3fHpdoMn3%3Dw-3J%2BN2e_nEgJHaNYia-3Xv%2BWw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/django-developers/CAMyDDM0W-8ywE%3D3fHpdoMn3%3Dw-3J%2BN2e_nEgJHaNYia-3Xv%2BWw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/AFE3161D-6571-46B1-AAD3-C21E4A9CE0C0%40gmail.com.

Reply via email to