summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-03-22 16:50:38 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-03-22 16:50:38 +0000
commit7a488faf070d8605780d660c32a026dfe2eb6ed8 (patch)
tree6ef9571329e00805d706f76d5e40cc24d14c0ffe /lib/sqlalchemy/databases
parentcef652a2d612ecbf078d57fbf81abef21a18b631 (diff)
downloadsqlalchemy-7a488faf070d8605780d660c32a026dfe2eb6ed8.tar.gz
- added explicit MSTimeStamp type which takes effect when using
types.TIMESTAMP.
Diffstat (limited to 'lib/sqlalchemy/databases')
-rw-r--r--lib/sqlalchemy/databases/mysql.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index e2784a136..5fc63234a 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -124,6 +124,10 @@ class MSTime(sqltypes.Time):
else:
return None
+class MSTimeStamp(sqltypes.TIMESTAMP):
+ def get_col_spec(self):
+ return "TIMESTAMP"
+
class MSText(sqltypes.TEXT):
def __init__(self, **kw):
self.binary = 'binary' in kw
@@ -232,8 +236,10 @@ colspecs = {
sqltypes.Boolean : MSBoolean,
sqltypes.TEXT : MSText,
sqltypes.CHAR: MSChar,
+ sqltypes.TIMESTAMP: MSTimeStamp
}
+
ischema_names = {
'boolean':MSBoolean,
'bigint' : MSBigInteger,
@@ -251,7 +257,7 @@ ischema_names = {
'numeric' : MSNumeric,
'float' : MSFloat,
'double' : MSDouble,
- 'timestamp' : MSDateTime,
+ 'timestamp' : MSTimeStamp,
'datetime' : MSDateTime,
'date' : MSDate,
'time' : MSTime,