From 438031dd580e3cfd54bb143accde846e9af62de9 Mon Sep 17 00:00:00 2001 From: Tanner Date: Fri, 13 Dec 2019 17:13:00 -0500 Subject: [PATCH] use jsonb instead of json (#131) --- Sources/FluentPostgresDriver/PostgresConverterDelegate.swift | 2 ++ Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift | 1 + 2 files changed, 3 insertions(+) diff --git a/Sources/FluentPostgresDriver/PostgresConverterDelegate.swift b/Sources/FluentPostgresDriver/PostgresConverterDelegate.swift index 22dba33..fe81abd 100644 --- a/Sources/FluentPostgresDriver/PostgresConverterDelegate.swift +++ b/Sources/FluentPostgresDriver/PostgresConverterDelegate.swift @@ -13,6 +13,8 @@ struct PostgresConverterDelegate: SQLConverterDelegate { return SQLRaw("TIMESTAMPTZ") case .double: return SQLRaw("DOUBLE PRECISION") + case .json: + return SQLRaw("JSONB") default: return nil } diff --git a/Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift b/Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift index b41ea7f..49c12b7 100644 --- a/Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift +++ b/Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift @@ -255,6 +255,7 @@ final class FluentPostgresDriverTests: XCTestCase { } } + try? EventMigration().revert(on: self.db).wait() try EventMigration().prepare(on: self.db).wait() defer { try! EventMigration().revert(on: self.db).wait() }