From 2b900ed683c5ee84dca68102428d109db156f46a Mon Sep 17 00:00:00 2001 From: Gabriel Jaldon Date: Sun, 7 Aug 2016 13:37:41 +0800 Subject: [PATCH 1/7] Install Ecto 2.0 --- mix.exs | 10 +++++----- mix.lock | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mix.exs b/mix.exs index da62627..35b32eb 100644 --- a/mix.exs +++ b/mix.exs @@ -6,7 +6,7 @@ defmodule EctoEnum.Mixfile do def project do [app: :ecto_enum, version: @version, - elixir: "~> 1.0", + elixir: "~> 1.2", deps: deps, description: "Ecto extension to support enums in models", test_paths: test_paths(Mix.env), @@ -31,10 +31,10 @@ defmodule EctoEnum.Mixfile do end defp deps do - [{:ecto, ">= 0.13.1 and ~> 1.1.0"}, - {:postgrex, ">= 0.8.3", optional: true}, - {:mariaex, ">= 0.3.0", optional: true}, - {:ex_doc, "~> 0.10", only: :docs}, + [{:ecto, "~> 2.0"}, + {:postgrex, "~> 0.11.0", optional: true}, + {:mariaex, "~> 0.7.7", optional: true}, + {:ex_doc, "~> 0.11", only: :docs}, {:earmark, "~> 0.1", only: :docs}, {:inch_ex, ">= 0.0.0", only: :docs}] end diff --git a/mix.lock b/mix.lock index 32e806f..e8d3b1e 100644 --- a/mix.lock +++ b/mix.lock @@ -1,11 +1,11 @@ -%{"connection": {:hex, :connection, "1.0.2", "f4a06dd3ecae4141aa66f94ce92ea4c4b8753069472814932f1cadbc3078ab80", [:mix], []}, - "db_connection": {:hex, :db_connection, "0.2.3", "9718deeb713ceb5213950a0de4f29b98133f4cb73cc9aca65648b5a8a1414c59", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 0.7", [hex: :sbroker, optional: true]}]}, +%{"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []}, + "db_connection": {:hex, :db_connection, "1.0.0-rc.4", "fad1f772c151cc6bde82412b8d72319968bc7221df8ef7d5e9d7fde7cb5c86b7", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}]}, "decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []}, "earmark": {:hex, :earmark, "0.2.1", "ba6d26ceb16106d069b289df66751734802777a3cbb6787026dd800ffeb850f3", [:mix], []}, - "ecto": {:hex, :ecto, "1.1.8", "0f0348e678fa5a450c266d69816808f97fbd82ade32cf88d4b09bbe8f8c27545", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.5.0 or ~> 0.6.0", [hex: :mariaex, optional: true]}, {:poison, "~> 1.0 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.4", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.0", [hex: :postgrex, optional: true]}, {:sbroker, "~> 0.7", [hex: :sbroker, optional: true]}]}, - "ex_doc": {:hex, :ex_doc, "0.11.5", "0dc51cb84f8312162a2313d6c71573a9afa332333d8a332bb12540861b9834db", [:mix], [{:earmark, "~> 0.1.17 or ~> 0.2", [hex: :earmark, optional: true]}]}, - "inch_ex": {:hex, :inch_ex, "0.3.3", "f53770404bb38385acbadd518ed571ba54d9608148ce7e7180e5826460b32f52", [:mix], [{:poison, "~> 1.2", [hex: :poison, optional: false]}]}, - "mariaex": {:hex, :mariaex, "0.6.5", "7f17fe274151554f33ff0c3778f447f05fe81c2fcff7a1e843233b1225546287", [:mix], [{:connection, "~> 1.0.0", [hex: :connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}, - "poison": {:hex, :poison, "1.5.2", "560bdfb7449e3ddd23a096929fb9fc2122f709bcc758b2d5d5a5c7d0ea848910", [:mix], []}, + "ecto": {:hex, :ecto, "2.0.4", "03fd3b9aa508b1383eb38c00ac389953ed22af53811aa2e504975a3e814a8d97", [:mix], [{:db_connection, "~> 1.0-rc.2", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}]}, + "ex_doc": {:hex, :ex_doc, "0.12.0", "b774aabfede4af31c0301aece12371cbd25995a21bb3d71d66f5c2fe074c603f", [:mix], [{:earmark, "~> 0.2", [hex: :earmark, optional: false]}]}, + "inch_ex": {:hex, :inch_ex, "0.5.3", "39f11e96181ab7edc9c508a836b33b5d9a8ec0859f56886852db3d5708889ae7", [:mix], [{:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: false]}]}, + "mariaex": {:hex, :mariaex, "0.7.7", "620a636ec2276c3fa031ac528039fc9d2bf7992e050e37a56b3c796511e94d6d", [:mix], [{:db_connection, "~> 1.0.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}, + "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []}, - "postgrex": {:hex, :postgrex, "0.11.1", "f48af70c0a58b9bfd1aaa456ec4273624554cfb837726b6a7f0701da4a94b2dd", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 0.2", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}} + "postgrex": {:hex, :postgrex, "0.11.2", "139755c1359d3c5c6d6e8b1ea72556d39e2746f61c6ddfb442813c91f53487e8", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 1.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}} From 9a54da52280b93fe307fc1a8b7363afefaa7a82f Mon Sep 17 00:00:00 2001 From: Gabriel Jaldon Date: Sun, 7 Aug 2016 13:38:00 +0800 Subject: [PATCH 2/7] Update test_helper --- test/mysql/ecto_enum_test.exs | 4 ++++ test/mysql/test_helper.exs | 45 ++++++++++++++++++++++++++++------- test/pg/test_helper.exs | 5 ++-- 3 files changed, 44 insertions(+), 10 deletions(-) diff --git a/test/mysql/ecto_enum_test.exs b/test/mysql/ecto_enum_test.exs index 3a092bc..ea73d9f 100644 --- a/test/mysql/ecto_enum_test.exs +++ b/test/mysql/ecto_enum_test.exs @@ -15,6 +15,10 @@ defmodule EctoEnumTest do alias Ecto.Integration.TestRepo + setup do + :ok = Ecto.Adapters.SQL.Sandbox.checkout(TestRepo) + end + test "accepts int, atom and string on save" do user = TestRepo.insert!(%User{status: 0}) user = TestRepo.get(User, user.id) diff --git a/test/mysql/test_helper.exs b/test/mysql/test_helper.exs index 4eb01ab..eb4de9a 100644 --- a/test/mysql/test_helper.exs +++ b/test/mysql/test_helper.exs @@ -1,25 +1,54 @@ ExUnit.start() -alias Ecto.Integration.TestRepo +Code.require_file "ecto_migration.exs", __DIR__ -Application.put_env(:ecto, TestRepo, +Application.put_env(:ecto, Ecto.Integration.TestRepo, adapter: Ecto.Adapters.MySQL, url: "ecto://root@localhost/ecto_test", pool: Ecto.Adapters.SQL.Sandbox) defmodule Ecto.Integration.TestRepo do use Ecto.Repo, otp_app: :ecto +end + +Application.put_env(:ecto, Ecto.Integration.PoolRepo, + adapter: Ecto.Adapters.MySQL, + url: "ecto://root@localhost/ecto_test", + pool_size: 10) + +defmodule Ecto.Integration.PoolRepo do + use Ecto.Repo, otp_app: :ecto - def log(_cmd), do: nil + def create_prefix(prefix) do + "create database #{prefix}" + end + + def drop_prefix(prefix) do + "drop database #{prefix}" + end end -# Load up the repository, start it, and run migrations -_ = Ecto.Storage.down(TestRepo) -:ok = Ecto.Storage.up(TestRepo) -{:ok, _pid} = TestRepo.start_link +defmodule Ecto.Integration.Case do + use ExUnit.CaseTemplate -Code.require_file "ecto_migration.exs", __DIR__ + setup do + :ok = Ecto.Adapters.SQL.Sandbox.checkout(TestRepo) + end +end + +alias Ecto.Integration.TestRepo +alias Ecto.Integration.PoolRepo +{:ok, _} = Ecto.Adapters.MySQL.ensure_all_started(TestRepo, :temporary) + +# Load up the repository, start it, and run migrations +_ = Ecto.Adapters.MySQL.storage_down(TestRepo.config) +:ok = Ecto.Adapters.MySQL.storage_up(TestRepo.config) + +{:ok, _pid} = TestRepo.start_link +{:ok, _pid} = PoolRepo.start_link :ok = Ecto.Migrator.up(TestRepo, 0, Ecto.Integration.Migration, log: false) +Ecto.Adapters.SQL.Sandbox.mode(TestRepo, :manual) Process.flag(:trap_exit, true) + diff --git a/test/pg/test_helper.exs b/test/pg/test_helper.exs index fd1ab01..457ca05 100644 --- a/test/pg/test_helper.exs +++ b/test/pg/test_helper.exs @@ -14,14 +14,15 @@ defmodule Ecto.Integration.TestRepo do end # Load up the repository, start it, and run migrations -_ = Ecto.Storage.down(TestRepo) -:ok = Ecto.Storage.up(TestRepo) +_ = Ecto.Adapters.Postgres.storage_down(TestRepo.config) +:ok = Ecto.Adapters.Postgres.storage_up(TestRepo.config) {:ok, pid} = TestRepo.start_link() Code.require_file "ecto_migration.exs", __DIR__ :ok = Ecto.Migrator.up(TestRepo, 0, Ecto.Integration.Migration, log: false) +Ecto.Adapters.SQL.Sandbox.mode(TestRepo, :manual) Process.flag(:trap_exit, true) :ok = TestRepo.stop(pid) From 5edebfc63161033d32971808faed217cd60af504 Mon Sep 17 00:00:00 2001 From: Gabriel Jaldon Date: Sun, 7 Aug 2016 13:40:28 +0800 Subject: [PATCH 3/7] Update error tuple format in test --- test/mysql/ecto_enum_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mysql/ecto_enum_test.exs b/test/mysql/ecto_enum_test.exs index ea73d9f..821f156 100644 --- a/test/mysql/ecto_enum_test.exs +++ b/test/mysql/ecto_enum_test.exs @@ -52,7 +52,7 @@ defmodule EctoEnumTest do end test "raises when input is not in the enum map" do - error = {:status, "is invalid"} + error = {:status, {"is invalid", [type: EctoEnumTest.StatusEnum]}} changeset = cast(%User{}, %{"status" => "retroactive"}, ~w(status), []) assert error in changeset.errors From eae26b7c7a6e37df84e2c03131783c55ed80f07c Mon Sep 17 00:00:00 2001 From: Gabriel Jaldon Date: Sun, 7 Aug 2016 13:41:38 +0800 Subject: [PATCH 4/7] Silence debug-level logging in tests --- test/pg/test_helper.exs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/pg/test_helper.exs b/test/pg/test_helper.exs index 457ca05..2dd1976 100644 --- a/test/pg/test_helper.exs +++ b/test/pg/test_helper.exs @@ -1,3 +1,4 @@ +Logger.configure(level: :info) ExUnit.start() alias Ecto.Integration.TestRepo From 01c1c129408323ca2b4c3e57e379dbe54edef28e Mon Sep 17 00:00:00 2001 From: Gabriel Jaldon Date: Thu, 11 Aug 2016 21:21:13 +0800 Subject: [PATCH 5/7] Fix error format in changeset assertions --- test/pg/ecto_enum_test.exs | 2 +- test/pg/postgres_test.exs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/pg/ecto_enum_test.exs b/test/pg/ecto_enum_test.exs index 3a092bc..cf203f3 100644 --- a/test/pg/ecto_enum_test.exs +++ b/test/pg/ecto_enum_test.exs @@ -48,7 +48,7 @@ defmodule EctoEnumTest do end test "raises when input is not in the enum map" do - error = {:status, "is invalid"} + error = {:status, {"is invalid", [type: EctoEnumTest.StatusEnum]}} changeset = cast(%User{}, %{"status" => "retroactive"}, ~w(status), []) assert error in changeset.errors diff --git a/test/pg/postgres_test.exs b/test/pg/postgres_test.exs index bc24436..bdc441c 100644 --- a/test/pg/postgres_test.exs +++ b/test/pg/postgres_test.exs @@ -15,7 +15,7 @@ defmodule EctoEnum.PostgresTest do alias Ecto.Integration.TestRepo - test "accepts int, atom and string on save" do + test "accepts atom and string on save" do user = TestRepo.insert!(%User{status: :registered}) user = TestRepo.get(User, user.id) assert user.status == :registered @@ -38,7 +38,8 @@ defmodule EctoEnum.PostgresTest do test "casts binary to atom" do %{errors: errors} = cast(%User{}, %{"status" => 3}, ~w(status), []) - assert {:status, "is invalid"} in errors + error = {:status, {"is invalid", [type: EctoEnum.PostgresTest.StatusEnum]}} + assert error in errors %{changes: changes} = cast(%User{}, %{"status" => "active"}, ~w(status), []) assert changes.status == :active @@ -48,7 +49,7 @@ defmodule EctoEnum.PostgresTest do end test "raises when input is not in the enum map" do - error = {:status, "is invalid"} + error = {:status, {"is invalid", [type: EctoEnum.PostgresTest.StatusEnum]}} changeset = cast(%User{}, %{"status" => "retroactive"}, ~w(status), []) assert error in changeset.errors From 6ac5cac10c0fece81ba37e199085aea2cd6c4bc2 Mon Sep 17 00:00:00 2001 From: AquarHEAD Lou Date: Thu, 18 Aug 2016 17:04:41 +0800 Subject: [PATCH 6/7] Fix `CREATE TYPE` query for Postgres String values should be single-quoted ref: https://www.postgresql.org/docs/current/static/datatype-enum.html --- lib/ecto_enum/postgres.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ecto_enum/postgres.ex b/lib/ecto_enum/postgres.ex index d60f1b6..dd32961 100644 --- a/lib/ecto_enum/postgres.ex +++ b/lib/ecto_enum/postgres.ex @@ -40,8 +40,8 @@ defmodule EctoEnum.Postgres do def __valid_values__(), do: @valid_values def create_type() do - types = Enum.join(unquote(list), ", ") - sql = "CREATE TYPE #{unquote type} AS ENUM (#{types})" + types = Enum.join(unquote(list), "', '") + sql = "CREATE TYPE #{unquote type} AS ENUM ('#{types}')" Ecto.Migration.execute sql end From 517201b0166a44d658e35b92ed3e3f19c8d85157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jan=20Niemier?= Date: Wed, 26 Oct 2016 17:18:01 +0200 Subject: [PATCH 7/7] Update Postgrex --- lib/ecto_enum/postgres.ex | 4 ++-- mix.exs | 2 +- mix.lock | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/ecto_enum/postgres.ex b/lib/ecto_enum/postgres.ex index dd32961..88b4153 100644 --- a/lib/ecto_enum/postgres.ex +++ b/lib/ecto_enum/postgres.ex @@ -40,8 +40,8 @@ defmodule EctoEnum.Postgres do def __valid_values__(), do: @valid_values def create_type() do - types = Enum.join(unquote(list), "', '") - sql = "CREATE TYPE #{unquote type} AS ENUM ('#{types}')" + types = Enum.map_join(unquote(list), ", ", &"'#{&1}'") + sql = "CREATE TYPE #{unquote type} AS ENUM (#{types})" Ecto.Migration.execute sql end diff --git a/mix.exs b/mix.exs index 35b32eb..40ca616 100644 --- a/mix.exs +++ b/mix.exs @@ -32,7 +32,7 @@ defmodule EctoEnum.Mixfile do defp deps do [{:ecto, "~> 2.0"}, - {:postgrex, "~> 0.11.0", optional: true}, + {:postgrex, "~> 0.12.0", optional: true}, {:mariaex, "~> 0.7.7", optional: true}, {:ex_doc, "~> 0.11", only: :docs}, {:earmark, "~> 0.1", only: :docs}, diff --git a/mix.lock b/mix.lock index e8d3b1e..9c1f06f 100644 --- a/mix.lock +++ b/mix.lock @@ -1,11 +1,11 @@ %{"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []}, - "db_connection": {:hex, :db_connection, "1.0.0-rc.4", "fad1f772c151cc6bde82412b8d72319968bc7221df8ef7d5e9d7fde7cb5c86b7", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}]}, - "decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []}, + "db_connection": {:hex, :db_connection, "1.0.0", "63c03e520d54886a66104d34e32397ba960db6e74b596ce221592c07d6a40d8d", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, optional: true]}]}, + "decimal": {:hex, :decimal, "1.2.0", "462960fd71af282e570f7b477f6be56bf8968e68277d4d0b641a635269bf4b0d", [:mix], []}, "earmark": {:hex, :earmark, "0.2.1", "ba6d26ceb16106d069b289df66751734802777a3cbb6787026dd800ffeb850f3", [:mix], []}, - "ecto": {:hex, :ecto, "2.0.4", "03fd3b9aa508b1383eb38c00ac389953ed22af53811aa2e504975a3e814a8d97", [:mix], [{:db_connection, "~> 1.0-rc.2", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}]}, + "ecto": {:hex, :ecto, "2.0.5", "7f4c79ac41ffba1a4c032b69d7045489f0069c256de606523c65d9f8188e502d", [:mix], [{:db_connection, "~> 1.0-rc.4", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.1.2 or ~> 1.2", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.12.0", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}]}, "ex_doc": {:hex, :ex_doc, "0.12.0", "b774aabfede4af31c0301aece12371cbd25995a21bb3d71d66f5c2fe074c603f", [:mix], [{:earmark, "~> 0.2", [hex: :earmark, optional: false]}]}, - "inch_ex": {:hex, :inch_ex, "0.5.3", "39f11e96181ab7edc9c508a836b33b5d9a8ec0859f56886852db3d5708889ae7", [:mix], [{:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: false]}]}, - "mariaex": {:hex, :mariaex, "0.7.7", "620a636ec2276c3fa031ac528039fc9d2bf7992e050e37a56b3c796511e94d6d", [:mix], [{:db_connection, "~> 1.0.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}, + "inch_ex": {:hex, :inch_ex, "0.5.5", "b63f57e281467bd3456461525fdbc9e158c8edbe603da6e3e4671befde796a3d", [:mix], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, optional: false]}]}, + "mariaex": {:hex, :mariaex, "0.7.8", "77bcc9e898a7f2231022ac0112f2832158d289fa3ef1e0020ceb61d00403134c", [:mix], [{:db_connection, "~> 1.0.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}, "poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []}, "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []}, - "postgrex": {:hex, :postgrex, "0.11.2", "139755c1359d3c5c6d6e8b1ea72556d39e2746f61c6ddfb442813c91f53487e8", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 1.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}} + "postgrex": {:hex, :postgrex, "0.12.1", "2f8b46cb3a44dcd42f42938abedbfffe7e103ba4ce810ccbeee8dcf27ca0fb06", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 1.0-rc.4", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}}