Skip to content

Commit

Permalink
using the jsonb column type (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Apr 24, 2019
1 parent ba24a85 commit 2263a6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mds/db/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def insert_status_changes_from(source_table, dest_table=mds.STATUS_CHANGES, on_c
cast(event_type as event_types),
cast(event_type_reason as event_type_reasons),
to_timestamp(event_time) at time zone 'UTC',
cast(event_location as json),
cast(event_location as jsonb),
battery_pct,
cast(associated_trips as uuid[])
FROM "{source_table}"
Expand Down Expand Up @@ -99,7 +99,7 @@ def insert_trips_from(source_table, dest_table=mds.TRIPS, on_conflict_update=Non
cast(trip_id as uuid),
trip_duration,
trip_distance,
cast(route as json),
cast(route as jsonb),
accuracy,
to_timestamp(start_time) at time zone 'UTC',
to_timestamp(end_time) at time zone 'UTC',
Expand Down

0 comments on commit 2263a6d

Please sign in to comment.