From: richard Date: Wed, 31 Mar 2004 07:25:14 +0000 (+0000) Subject: MySQL and Postgresql use BOOL/BOOLEAN for Boolean types X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d054b3f99272f09d29475d77b63bc6c383724f43;p=roundup.git MySQL and Postgresql use BOOL/BOOLEAN for Boolean types git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2236 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 3dbe83b..7865084 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ Fixed: - 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 diff --git a/doc/whatsnew-0.7.txt b/doc/whatsnew-0.7.txt index db409db..499618a 100644 --- a/doc/whatsnew-0.7.txt +++ b/doc/whatsnew-0.7.txt @@ -309,9 +309,8 @@ New configuration options 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 @@ New auditor fixes Outlook bug 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, diff --git a/roundup/backends/back_mysql.py b/roundup/backends/back_mysql.py index 2efd853..be07b87 100644 --- a/roundup/backends/back_mysql.py +++ b/roundup/backends/back_mysql.py @@ -117,7 +117,7 @@ class Database(Database): hyperdb.Link : 'INTEGER', hyperdb.Interval : 'VARCHAR(255)', hyperdb.Password : 'VARCHAR(255)', - hyperdb.Boolean : 'INTEGER', + hyperdb.Boolean : 'BOOL', hyperdb.Number : 'REAL', } diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index 435b99c..684a04c 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -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 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): 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 @@ class Database(FileStorage, hyperdb.Database, roundupdb.Database): 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):