Recreation of foreign key constraints when changing type of referenced primary key

2022-03-22 Thread Gregor Jerše
Hi, I have a question regarding Django version 3.2.12. When I change the DEFAULT_AUTO_FIELD to BigAutoField and create&apply migrations, the foreign keys of auto-generated through tables are dropped. This can be observed by running sqlmigrate which drops foreign key relations but never recreat

Missing ORDER BY in subselect?

2014-04-16 Thread Gregor Jerše
Hi! I am experiencing a weird Queryset behavior. Let the variable treatments refer to an ordered (and sliced) queryset. The first query Service.objects.filter(treatment__in=treatments).distinct() returns different objects than the second one Service.objects.filter(treatment__in=list(treatment