#9862: Non-standard SQL generated in column definition for nullable columns in
create table DDL
-----------------------------+----------------------------------------------
   Reporter:  Ambrish        |                Owner:  nobody    
     Status:  new            |            Milestone:            
  Component:  Uncategorized  |              Version:  1.0       
   Keywords:                 |                Stage:  Unreviewed
  Has_patch:  0              |           Needs_docs:  0         
Needs_tests:  0              |   Needs_better_patch:  0         
-----------------------------+----------------------------------------------
 Hi,

 While doing backend testing for new DB2 adapter (I am developing it), I
 found that in CREATE TABLE DDL generation, it contains some non-standard
 SQL syntax.

 Here is one example of model.

 {{{
 class User(models.Model):
     first_name = models.CharField(max_length=20, null=False)
     last_name = models.CharField(max_length=20, null=True)

     class Meta:
         db_table = "temp_user"
 }}}

 For the column '''last_name''', the SQL that gets generated is
 '''LAST_NAME VARCHAR(20) NULL'''. The trailing '''NULL''' is not a
 standard SQL. This can be validated by the SQL validator tool -
 http://developer.mimer.com/validator/parser200x/index.tml Needless to say,
 this will fail in DB2 and so too in Oracle.


 I find only one method in the docs which deals with the table DDL
 generation '''BaseDatabaseCreation.sql_create_model'''.

 Regards,[[BR]]
 Ambrish Bhargava

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9862>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to