Skip to content

Commit 2fd224b

Browse files
author
Richard Jones
committed
MySQL and Postgresql use BOOL/BOOLEAN for Boolean types
1 parent b9cf245 commit 2fd224b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Fixed:
66
- CSV export was busted (as was any action returning a result)
77
- MultiMapping deviated from the Zope C implementation in a number of
88
places (thanks Toby Sargeant)
9+
- MySQL and Postgresql use BOOL/BOOLEAN for Boolean types
910

1011

1112
2004-03-27 0.7.0b2

doc/whatsnew-0.7.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,8 @@ New configuration options
309309
Typed columns in RDBMS backends
310310
-------------------------------
311311

312-
The MySQL (and Postgresql for that matter) backend now creates tables with
313-
appropriate column datatypes (not just varchar). Sqlite got the typing
314-
too, but it ignores the datatypes :)
312+
The SQLite, MySQL and Postgresql backends now create tables with
313+
appropriate column datatypes (not just varchar).
315314

316315
Your database will be automatically migrated to use the new schemas, but
317316
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
363362
The new optional auditor ``detectors/emailauditor.py`` fires whenever a
364363
new file entity is created.
365364

366-
If the file is of type message/rfc822, we tack onthe extension .eml.
365+
If the file is of type message/rfc822, we tack on the extension .mht.
367366

368367
The reason for this is that Microsoft Internet Explorer will not open
369368
things with a .eml attachment, as they deem it 'unsafe'. Worse yet,

roundup/backends/back_mysql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class Database(Database):
117117
hyperdb.Link : 'INTEGER',
118118
hyperdb.Interval : 'VARCHAR(255)',
119119
hyperdb.Password : 'VARCHAR(255)',
120-
hyperdb.Boolean : 'INTEGER',
120+
hyperdb.Boolean : 'BOOL',
121121
hyperdb.Number : 'REAL',
122122
}
123123

roundup/backends/rdbms_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.86 2004-03-24 04:57:25 richard Exp $
1+
# $Id: rdbms_common.py,v 1.87 2004-03-31 07:25:14 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -231,7 +231,7 @@ def reindex(self):
231231
hyperdb.Link : 'INTEGER',
232232
hyperdb.Interval : 'VARCHAR(255)',
233233
hyperdb.Password : 'VARCHAR(255)',
234-
hyperdb.Boolean : 'INTEGER',
234+
hyperdb.Boolean : 'BOOLEAN',
235235
hyperdb.Number : 'REAL',
236236
}
237237
def determine_columns(self, properties):
@@ -611,7 +611,7 @@ def clear(self):
611611
hyperdb.Link : int,
612612
hyperdb.Interval : lambda x: x.serialise(),
613613
hyperdb.Password : str,
614-
hyperdb.Boolean : int,
614+
hyperdb.Boolean : lambda x: x and 'TRUE' or 'FALSE',
615615
hyperdb.Number : lambda x: x,
616616
}
617617
def addnode(self, classname, nodeid, node):

0 commit comments

Comments
 (0)