From d054b3f99272f09d29475d77b63bc6c383724f43 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 31 Mar 2004 07:25:14 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 1 + doc/whatsnew-0.7.txt | 7 +++---- roundup/backends/back_mysql.py | 2 +- roundup/backends/rdbms_common.py | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) 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): -- 2.30.2