Author: phd
Date: 2009-05-18 10:00:34 -0600 (Mon, 18 May 2009)
New Revision: 3885
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
Log:
Two bug in SQLiteConnection.columnsFromSchema() were fixed: use
sqlmeta.idName instead of 'id'; convert default 'NULL' to None.
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2009-05-18 15:59:35 UTC (rev 3884)
+++ SQLObject/trunk/docs/News.txt 2009-05-18 16:00:34 UTC (rev 3885)
@@ -53,6 +53,8 @@
* Better support for Python 2.6: do not import the deprecated sets module.
+* A number of changes ported from `SQLObject 0.9.11`_.
+
SQLObject 0.10.5
================
@@ -163,6 +165,12 @@
* Under MySQL, PickleCol no longer used TEXT column types; the smallest
column is now BLOB - it is not possible to create TINYBLOB column.
+SQLObject 0.9.11
+================
+
+* Two bug in SQLiteConnection.columnsFromSchema() were fixed: use
+ sqlmeta.idName instead of 'id'; convert default 'NULL' to None.
+
SQLObject 0.9.10
================
Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2009-05-18 15:59:35 UTC (rev 3884)
+++ SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2009-05-18 16:00:34 UTC (rev 3885)
@@ -295,9 +295,12 @@
colData = self.queryAll("PRAGMA table_info(%s)" % tableName)
results = []
for index, field, t, nullAllowed, default, key in colData:
- if field == 'id':
+ if field == soClass.sqlmeta.idName:
continue
colClass, kw = self.guessClass(t)
+ if default == 'NULL':
+ nullAllowed = True
+ default = None
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['dbName'] = field
kw['notNone'] = not nullAllowed
|