Use explicit Postgrex JSON types with Elixir JSON module
This commit is contained in:
@@ -75,6 +75,8 @@ config :parrhesia, Parrhesia.Web.MetricsEndpoint,
|
|||||||
ip: {127, 0, 0, 1},
|
ip: {127, 0, 0, 1},
|
||||||
port: 9568
|
port: 9568
|
||||||
|
|
||||||
|
config :parrhesia, Parrhesia.Repo, types: Parrhesia.PostgresTypes
|
||||||
|
|
||||||
config :parrhesia, ecto_repos: [Parrhesia.Repo]
|
config :parrhesia, ecto_repos: [Parrhesia.Repo]
|
||||||
|
|
||||||
import_config "#{config_env()}.exs"
|
import_config "#{config_env()}.exs"
|
||||||
|
|||||||
1
lib/parrhesia/postgres_types.ex
Normal file
1
lib/parrhesia/postgres_types.ex
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Postgrex.Types.define(Parrhesia.PostgresTypes, [], json: JSON)
|
||||||
Reference in New Issue
Block a user