From 6167c247f0225292b5d34eb5fe74246842523f25 Mon Sep 17 00:00:00 2001 From: roll Date: Mon, 2 Oct 2017 16:40:13 +0300 Subject: [PATCH] Rebase SQLite numbers on float (no native support) --- tableschema_sql/mapper.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tableschema_sql/mapper.py b/tableschema_sql/mapper.py index fc43466..a623b10 100644 --- a/tableschema_sql/mapper.py +++ b/tableschema_sql/mapper.py @@ -127,7 +127,7 @@ def convert_type(self, type): 'geojson': None, 'geopoint': None, 'integer': sa.Integer, - 'number': sa.Numeric, + 'number': sa.Float, 'object': None, 'string': sa.Text, 'time': sa.Time, @@ -135,17 +135,12 @@ def convert_type(self, type): 'yearmonth': None, } - # Mysql dialect - if self.__dialect == 'mysql': - mapping.update({ - 'number': sa.Float, - }) - # Postgresql dialect if self.__dialect == 'postgresql': mapping.update({ 'array': JSONB, 'geojson': JSONB, + 'number': sa.Numeric, 'object': JSONB, })