From 4811126361b0fd475f7585d46be85183db6b0773 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Thu, 1 Nov 2018 11:40:48 +0530 Subject: [PATCH] Add support for native JSON/JSONB columns in Postgres results db --- backends/sqldb.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/sqldb.go b/backends/sqldb.go index 45924bf..dd828a1 100644 --- a/backends/sqldb.go +++ b/backends/sqldb.go @@ -255,6 +255,10 @@ func (s *sqlDB) createTableSchema(cols []string, colTypes []*sql.ColumnType) ins typ = "DATE" case "BOOLEAN": // Postgres, MySQL typ = "BOOLEAN" + case "JSON", "JSONB": // Postgres + if s.dbType != dbTypePostgres { + typ = "TEXT" + } default: typ = "TEXT" }