panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Data too long for column 'name' at row 1 #72

Closed pasevin closed 4 years ago

pasevin commented 5 years ago

python manage.py currencies fails with: MySQLdb._exceptions.DataError: (1406, "Data too long for column 'name' at row 1")

racitup commented 5 years ago

Please can you be more specific with what you're trying to do, what version of django, the module version you have reported by pip and where you installed it from?

einarf commented 5 years ago

Maybe creating issue templates could be an idea? Need to do that for a couple of my projects as well when I think of it.

pasevin commented 5 years ago

Sorry if it was not clear enough.

I was trying to use management command python manage.py currencies to populate my DB with up to date currencies from OPENEXCHANGERATES. It kept updating my DB with no problem until it reached some currency which name appeared too long for the field 'name'. This is where it crashed.

Module version is the latest 0.9.0. Django 2.1.10

pasevin commented 5 years ago

Looks like the current name varchar limitation of 35 characters is too small for some currency names.

pasevin commented 5 years ago

This PR fixes it: https://github.com/panosl/django-currencies/pull/74