RadiantHex RadiantHex - 1 year ago 221
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 Source

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);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download