Use only 15 decimal digits for MySQL double to match the Python float

This commit is contained in:
Cédric Krier
2010-03-12 12:22:55 +01:00
parent 8ea533585b
commit c162fd3583
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class Float(fields.Float):
@staticmethod
def sql_type(field):
return ('double', 'double(255, 30)')
return ('double', 'double(255, 15)')
class Numeric(fields.Numeric):
+1 -1
View File
@@ -399,7 +399,7 @@ class TableHandler(TableHandlerInterface):
elif typname == 'decimal':
res = 'decimal(65, 30)'
elif typname == 'double':
res = 'double(255, 30)'
res = 'double(255, 15)'
else:
res = typname
# Default value for timestamp doesn't work