diff --git a/lib/geo_postgis/geometry.ex b/lib/geo_postgis/geometry.ex index dc1ed60..a35197c 100644 --- a/lib/geo_postgis/geometry.ex +++ b/lib/geo_postgis/geometry.ex @@ -57,6 +57,8 @@ if Code.ensure_loaded?(Ecto.Type) do GeometryCollection ] + @type t :: Geo.geometry() + if macro_exported?(Ecto.Type, :__using__, 1) do use Ecto.Type else diff --git a/test/ecto_test.exs b/test/ecto_test.exs index b449197..f9b67ea 100644 --- a/test/ecto_test.exs +++ b/test/ecto_test.exs @@ -37,8 +37,7 @@ defmodule Geo.Ecto.Test do setup _ do {:ok, pid} = Postgrex.start_link(Geo.Test.Helper.opts()) - {:ok, _} = - Postgrex.query(pid, "CREATE EXTENSION IF NOT EXISTS postgis", []) + {:ok, _} = Postgrex.query(pid, "CREATE EXTENSION IF NOT EXISTS postgis", []) {:ok, _} = Postgrex.query(pid, "DROP TABLE IF EXISTS locations, geographies, location_multi", [])