IntegrityError : AUTH_USER DJango 1.8

28 views
Skip to first unread message

Jose Paul

unread,
Sep 21, 2015, 7:14:39 AM9/21/15
to Django users
Daer All,

I am trying to run DJango 1.8 test cases .

I am getting several IntegrityError  error  on AUTH_USER table .


SQL 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)

Values it tries to insert 

(None, None, True, u'superuser', None, None, None, False, True, u'2015-09-17 12:31:09.562000')

Error 
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

In the table only LAST_LOGIN is nullable field .
But the sql generated tries to insert none to other fields .DB2 throw error because of this .

I think there is some problem in the sql generated .
I am getting several same  errors on this table .

Can someone comment please .

Thanks
Jose



Reply all
Reply to author
Forward
0 new messages