Hi Shai,

interprets_empty_strings_as_null is set to False

Regards,
Jose

On Tuesday, September 22, 2015 at 5:39:14 PM UTC+5:30, Shai Berger wrote:
>
> On Tuesday 22 September 2015 09:39:17 Jose Paul wrote: 
> > Dear All, 
> > 
> > I am trying to run DJango 1.8 test cases with DB2 
> > 
> > 
> > Several insert statement fails 
> > 
> > Here is the insert command generated by test case. 
> > 
> > INSERT INTO "AUTH_USER" ("PASSWORD", "LAST_LOGIN", "IS_SUPERUSER", 
> > "USERNAME", "FIRST_NAME", "LAST_NAME", "EMAIL", "IS_STAFF", "IS_ACTIVE", 
> > "DATE_JOINED") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) 
> > 
> > Value : (None, None, True, u'superuser', None, None, None, False, True, 
> > u'2015-09-17 12:31:09.562000') 
> > 
> > ibm_db_dbi::IntegrityError: Statement Execute Failed: [IBM][CLI 
> > Driver][DB2/NT] SQL0407N  Assignment of a NULL value to a NOT NULL 
> column 
> > "TBSPACEID=2, TABLEID=24, COLNO=1" is not allowed.  SQLSTATE=23502\r 
> > SQLCODE=-407 
> > 
> > 
> > Except last_login none of the field are nullable . 
> > But still DJango testcase generate insert statement  as above and pass 
> None 
> > as value which fails . 
> > 
> > Why this happens ?. 
>
> Does the DB2 backend has the feature interprets_empty_strings_as_null set 
> to 
> True? 
>
> If it does, it should also make sure to generate the CharField's datbase 
> columns as nullable, whether or not the fields are defined null=True. 
>
> HTH, 
>         Shai. 
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a65a985a-145d-4cdc-b9f4-a9e4343662aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to