Use only 15 decimal digits for MySQL double to match the Python float
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user