Author: jbronn
Date: 2009-04-07 19:09:06 -0500 (Tue, 07 Apr 2009)
New Revision: 10443

Modified:
   django/trunk/django/contrib/gis/db/backend/spatialite/field.py
Log:
Now take advantage of new argument accepted by `AddGeometryColumn` in 
SpatiaLite 2.3 that allows geometry columns to specified as `NOT NULL`.


Modified: django/trunk/django/contrib/gis/db/backend/spatialite/field.py
===================================================================
--- django/trunk/django/contrib/gis/db/backend/spatialite/field.py      
2009-04-07 22:21:10 UTC (rev 10442)
+++ django/trunk/django/contrib/gis/db/backend/spatialite/field.py      
2009-04-08 00:09:06 UTC (rev 10443)
@@ -25,8 +25,9 @@
                style.SQL_FIELD(gqn(self.column)) + ', ' +
                style.SQL_FIELD(str(self.srid)) + ', ' +
                style.SQL_COLTYPE(gqn(self.geom_type)) + ', ' +
-               style.SQL_KEYWORD(str(self.dim)) + ');')
-
+               style.SQL_KEYWORD(str(self.dim)) + ', ' +
+               style.SQL_KEYWORD(str(int(not self.null))) +
+               ');')
         return sql
 
     def _geom_index(self, style, db_table):


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to