Mercurial > p > roundup > code
changeset 2166:cd42c3c7173a
MySQL and Postgresql use BOOL/BOOLEAN for Boolean types
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 31 Mar 2004 07:25:14 +0000 |
| parents | 29c1e33d9d66 |
| children | 4dafc87a0113 |
| files | CHANGES.txt doc/whatsnew-0.7.txt roundup/backends/back_mysql.py roundup/backends/rdbms_common.py |
| diffstat | 4 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Tue Mar 30 23:01:41 2004 +0000 +++ b/CHANGES.txt Wed Mar 31 07:25:14 2004 +0000 @@ -6,6 +6,7 @@ - CSV export was busted (as was any action returning a result) - MultiMapping deviated from the Zope C implementation in a number of places (thanks Toby Sargeant) +- MySQL and Postgresql use BOOL/BOOLEAN for Boolean types 2004-03-27 0.7.0b2
--- a/doc/whatsnew-0.7.txt Tue Mar 30 23:01:41 2004 +0000 +++ b/doc/whatsnew-0.7.txt Wed Mar 31 07:25:14 2004 +0000 @@ -309,9 +309,8 @@ Typed columns in RDBMS backends ------------------------------- -The MySQL (and Postgresql for that matter) backend now creates tables with -appropriate column datatypes (not just varchar). Sqlite got the typing -too, but it ignores the datatypes :) +The SQLite, MySQL and Postgresql backends now create tables with +appropriate column datatypes (not just varchar). Your database will be automatically migrated to use the new schemas, but it will take time. It's probably a good idea to make sure you do this as @@ -363,7 +362,7 @@ The new optional auditor ``detectors/emailauditor.py`` fires whenever a new file entity is created. -If the file is of type message/rfc822, we tack onthe extension .eml. +If the file is of type message/rfc822, we tack on the extension .mht. The reason for this is that Microsoft Internet Explorer will not open things with a .eml attachment, as they deem it 'unsafe'. Worse yet,
--- a/roundup/backends/back_mysql.py Tue Mar 30 23:01:41 2004 +0000 +++ b/roundup/backends/back_mysql.py Wed Mar 31 07:25:14 2004 +0000 @@ -117,7 +117,7 @@ hyperdb.Link : 'INTEGER', hyperdb.Interval : 'VARCHAR(255)', hyperdb.Password : 'VARCHAR(255)', - hyperdb.Boolean : 'INTEGER', + hyperdb.Boolean : 'BOOL', hyperdb.Number : 'REAL', }
--- a/roundup/backends/rdbms_common.py Tue Mar 30 23:01:41 2004 +0000 +++ b/roundup/backends/rdbms_common.py Wed Mar 31 07:25:14 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.86 2004-03-24 04:57:25 richard Exp $ +# $Id: rdbms_common.py,v 1.87 2004-03-31 07:25:14 richard Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -231,7 +231,7 @@ hyperdb.Link : 'INTEGER', hyperdb.Interval : 'VARCHAR(255)', hyperdb.Password : 'VARCHAR(255)', - hyperdb.Boolean : 'INTEGER', + hyperdb.Boolean : 'BOOLEAN', hyperdb.Number : 'REAL', } def determine_columns(self, properties): @@ -611,7 +611,7 @@ hyperdb.Link : int, hyperdb.Interval : lambda x: x.serialise(), hyperdb.Password : str, - hyperdb.Boolean : int, + hyperdb.Boolean : lambda x: x and 'TRUE' or 'FALSE', hyperdb.Number : lambda x: x, } def addnode(self, classname, nodeid, node):
