Hi, I’ve been using for Django ages and besides regular development, I’m also a kind of Django advocate in our company. We have a medium-sized financial project and I started to move it from Oracle to Postgres and convince the rest of the team about this. Historically, we had some difficulties around null vs empty string behavior of Oracle and I hoped these would be gone once we move Postgres, but things are not as easy.
My idea of a new guidelines for our project was to follow Django doc and use empty string for “no-data” value except of fields that need to be unique (btw, this sounds weird enough for my colleagues with more of a DB background). But then I ran into issue with BICValidator
from django-localflavor
which enforces the value to be either None
or 8 or 11 chars. So should our policy be “always empty string unless it is unique value or a BIC code”?
I’m bit afraid that having a different empty value for each DB column based on how validation is implemented in each library is strange approach. Or shall I just file a bug report on BICValidator
to allow empty string as well?