From 1dc72fe8765c1d39e42f0cca997075a489e3395c Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Wed, 8 Apr 2009 00:09:06 +0000 Subject: [PATCH] Now take advantage of new argument accepted by `AddGeometryColumn` in SpatiaLite 2.3 that allows geometry columns to specified as `NOT NULL`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10443 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/db/backend/spatialite/field.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/django/contrib/gis/db/backend/spatialite/field.py b/django/contrib/gis/db/backend/spatialite/field.py index 971f2f6bfa..2be4780389 100644 --- a/django/contrib/gis/db/backend/spatialite/field.py +++ b/django/contrib/gis/db/backend/spatialite/field.py @@ -25,8 +25,9 @@ class SpatiaLiteField(Field): 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):