Skip to content

Commit

Permalink
Rebase SQLite numbers on float (no native support)
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Oct 2, 2017
1 parent 26a90ce commit 6167c24
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tableschema_sql/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,20 @@ 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,
'year': sa.Integer,
'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,
})

Expand Down

0 comments on commit 6167c24

Please sign in to comment.