Author: phd
Date: 2009-05-18 09:58:01 -0600 (Mon, 18 May 2009)
New Revision: 3883
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/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/branches/0.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2009-05-18 15:53:15 UTC (rev 3882)
+++ SQLObject/branches/0.10/docs/News.txt 2009-05-18 15:58:01 UTC (rev 3883)
@@ -122,6 +122,12 @@
* Under MySQL, PickleCol no longer uses 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/branches/0.10/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2009-05-18 15:53:15 UTC (rev 3882)
+++ SQLObject/branches/0.10/sqlobject/sqlite/sqliteconnection.py 2009-05-18 15:58:01 UTC (rev 3883)
@@ -294,9 +294,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
|