From c162fd35838ffc9acdc599cfd193a1b2fedd04fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 12 Mar 2010 12:22:55 +0100 Subject: [PATCH] Use only 15 decimal digits for MySQL double to match the Python float --- trytond/backend/mysql/fields.py | 2 +- trytond/backend/mysql/table.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/backend/mysql/fields.py b/trytond/backend/mysql/fields.py index bd2d4190f6..657d3fb256 100644 --- a/trytond/backend/mysql/fields.py +++ b/trytond/backend/mysql/fields.py @@ -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): diff --git a/trytond/backend/mysql/table.py b/trytond/backend/mysql/table.py index 0d62775348..b708c98682 100644 --- a/trytond/backend/mysql/table.py +++ b/trytond/backend/mysql/table.py @@ -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