RadiantHex RadiantHex - 2 months ago 21
Python Question

Django queryset update fields with the lowercase equivalent - Django

I would like to update various models in go.

I need to update a varchar field with the lowercase equivalent.




Any idea if this can be done with a single queryset?

Answer

Since this is a one-off it would be easier to just run ./manage.py dbshell and run the UPDATE queries directly.

UPDATE sometable SET somefield=LOWER(somefield);
Comments