Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-29 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  oracle   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Fixed in 584e2c03376895aeb0404cc1fcc1ad24dfdbc58e

 For the record: Alex spotted that the patch altered the way non-nullable
 character fields are handled in sql/query.py. There were a couple of
 field.null checks there, and those are now handled by is_nullable(field)
 so that the old behavior is preserved. See
 https://github.com/django/django/pull/19/ for more details.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-11 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  oracle   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * stage:  Accepted => Ready for checkin


Comment:

 The patch looks good to me. It doesn't look like any additional tests are
 needed, the test suite fails pretty spectacularly if you accidentally have
 char fields as NOT NULL on Oracle.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-11 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  oracle   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by ikelly):

 * keywords:   => oracle


-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-10 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by ikelly):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-10 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by ikelly):

 I've uploaded a patch to prevent emitting "NOT NULL" without actually
 changing the field.null.  This also takes care of the nullable primary key
 issue that Anssi identified.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-08 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by akaariai):

 * cc: anssi.kaariainen@… (added)


Comment:

 There is a related test failure under Oracle:
 {{{
  ./runtests.py --settings=test_oracle test_runner
 Creating test database for alias 'default'...
 Creating test user...
 Creating test database for alias 'other'...
 Creating test user...
 ...sError: One or more models did not validate:
 sessions.session: "session_key": Primary key fields cannot have null=True.

 E.
 ==
 ERROR: test_ticket_16885
 (regressiontests.test_runner.tests.Ticket16885RegressionTests)
 Features are also confirmed on mirrored databases.
 --
 Traceback (most recent call last):
   File
 "/home/akaariai/Programming/django/tests/regressiontests/test_runner/tests.py",
 line 203, in test_ticket_16885
 DjangoTestSuiteRunner(verbosity=0).setup_databases()
   File "/home/akaariai/Programming/django/tests/django/test/simple.py",
 line 306, in setup_databases
 self.verbosity, autoclobber=not self.interactive)
   File
 "/home/akaariai/Programming/django/tests/django/db/backends/creation.py",
 line 271, in create_test_db
 load_initial_data=False)
   File
 "/home/akaariai/Programming/django/tests/django/core/management/__init__.py",
 line 150, in call_command
 return klass.execute(*args, **defaults)
   File
 "/home/akaariai/Programming/django/tests/django/core/management/base.py",
 line 248, in execute
 sys.exit(1)
 SystemExit: 1
 }}}

 I believe the cause of this error is having a `CharField` with
 primary_key=True, and this leads to validation failure as pk + null=True
 isn't a valid combination.

 If I am not mistaken it would be enough to create the character fields
 with the "NOT NULL" part removed, and leaving field.null alone.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs

2012-04-07 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by ramiro):

 See also #13528, #13711 that are about other parts of model
 characteristics that use data from the `'default'` DATABASES alias.

-- 
Ticket URL: 
Django 
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.



Re: [Django] #17957: If engine for default DB alias has interprets_empty_strings_as_nulls (i.e. Oracle) it affects DDL SQL for model fields null=False in other DBs (was: ORM do not respect null=False

2012-04-07 Thread Django
#17957: If engine for default DB alias has interprets_empty_strings_as_nulls 
(i.e.
Oracle) it affects DDL SQL for model fields null=False in other DBs
-+-
 Reporter:  bhuztez  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by ramiro):

 * stage:  Unreviewed => Accepted


Comment:

 Ah I get it now. Thanks for the patience.

-- 
Ticket URL: 
Django 
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.