Hi Florian,

Thanks for getting back to me. Allow me elaborate
My main question is: what is the rationale for enforcing null value checks 
in middleware, and not delegating to DB?

My proposal would be:
- If null=False is specified, then add an explicit not null constraint at 
the db level
- When converting between python and sql, convert empty strings to nulls

This would prevent insertion of blank strings and nulls into required 
columns, regardless of the client accessing the DB - something that can 
currently only be mimicked at the middleware level, and requires all 
clients to use Django. 

Hope this makes things clearer.

Thanks,
Vackar


On Thursday, 8 November 2018 12:43:25 UTC, Florian Apolloner wrote:
>
> Oracle treats NULL and empty varchar2 the same; so null=True/False is 
> simply not possible on Oracle for CharField. I am not sure what you are 
> proposing here…
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/d10086be-7da1-4f44-bb0a-2093b4b2baeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to