Bugs item #1414773, was opened at 2006-01-25 20:06
Message generated for change (Comment added) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1414773&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MySQL
Group: SQLObject from repository
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Default values aren't typed in MySQL tables w/ fromDatabase
Initial Comment:
The default values given in a MySQL table are passed in as string values in
the the 'MySQLConnection.columnsFromSchema' method.
For example, a simple table that describes a column like so:
age INT NOT NULL DEFAULT 0
...will actually create a IntCol object whose default is '0' (stringified zero).
Attached is a local patch I have to handle the various numeric and date/
time columns. Will follow-up with additional tests to verify the changes...
----------
Using Python 2.4.1 and SQLObject r1536
URL: http://svn.colorstudy.com/SQLObject/trunk
Repository UUID: 95a46c32-92d2-0310-94a5-8d71aeb3d4b3
Revision: 1536
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2006-05-18 19:37
Message:
Logged In: YES
user_id=4799
The patch is almost good, except for datetime. The patch
used datetime which is not available in Python 2.2
(SQLObject still supports Python 2.2). Please use the same
route as in col.py - check what is available and what is
prefered by the user.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1414773&group_id=74338
|