I need to change some objects primary keys in my django app, I wonder how can I achieve that?
Also my model has relations with other models.
Technically, it should be possible with an update query on the queryset:
MyModel.objects.filter(id=old_id).update(id=new_id)
The relations should cascade too if the constraints in the database have been set up correctly, but in general, I'd avoid updating PKs.