Many thanks for your help.
Wayne
Hi,
I try to create tables using Django models in our test oracle
database. I define a model with one column like this: name =
models.CharField(max_length=512, null=False, blank=False). After
running python manage.py syncdb, I found that column 'name' in the
generated table still allows null value in the column definition. I
understand that null = false is the default option. And I verified
that for other types of Django fields, null = false or no such option
at all would generate columns that do not allow null values in the
database. Is there particular reason why null = false is not enforced
for charField?
Many thanks for your reply.
Now our business requirements do not allow either empty string or null
value for this particular charField column (name =
models.CharField(max_length=512, null=False, blank=False)). How do you
suggest we should configure this field so that we can enforce not null
condition in the oracle database by using syncdb? Currently, after
creating those tables we need to manually modify the column properties
in Oracle to make them not null. Or Django Oracle backend deliberately
ignores null=false for charField creation?
Wayne
On Feb 26, 8:47 pm, Karen Tracey <kmtra...@gmail.com> wrote:
This is still a good question :)