Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to ecto 3 and phoenix_ecto 4 #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ config :alkemist, ecto_repos: [Alkemist.Repo]

config :alkemist, Alkemist.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("PG_USER"),
password: System.get_env("PG_PASSWORD"),
username: System.get_env("PG_USER") || "postgres",
password: System.get_env("PG_PASSWORD") || "postgres",
database: "alkemist_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
5 changes: 0 additions & 5 deletions lib/alkemist/assign.ex
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,6 @@ defmodule Alkemist.Assign do
{scope, opts, callback}
end

defp map_scope({scope, opts}, query, repo),
do: map_scope({scope, opts, fn q -> q end}, query, params, repo)

defp map_scope(scope, query, repo), do: map_scope({scope, []}, query, params, repo)

# Merges the scope callback into the query
defp scope(query, scopes) do
current = Enum.find(scopes, fn {_s, opts, _cb} -> opts[:active] == true end)
Expand Down
2 changes: 1 addition & 1 deletion lib/alkemist/controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ defmodule Alkemist.Controller do
default is `:string`. If the type is `:select`, a collection to build the select must be passed (see `Phoenix.HTMl.Form.select/4`)
"""
@type filter :: atom() | keyword()
@type field :: atom() | {atom(), map()} | %{title: string(), fields: [{atom(), map()}]}
@type field :: atom() | {atom(), map()} | %{title: String.t(), fields: [{atom(), map()}]}


Module.register_attribute __MODULE__, :menu_items, accumulate: true, persist: true
Expand Down
23 changes: 17 additions & 6 deletions lib/alkemist/menu_registry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ defmodule Alkemist.MenuRegistry do
end
end

defp cache_path(path \\ nil) do
if is_nil(path), do: path = Alkemist.Config.get(:web_interface)
defp cache_path do
cache_path(Alkemist.Config.get(:web_interface))
end

defp cache_path(path) do
Path.join([System.tmp_dir!(), "#{path}", "alkemist"])
end

Expand Down Expand Up @@ -160,11 +163,19 @@ defmodule Alkemist.MenuRegistry do

defp build_tree([], results), do: results

defp ensure_setup, do: do_ensure_setup(cache_path())

defp ensure_setup(module) do
module
|> to_string()
|> app_from_module()
|> cache_path()
|> do_ensure_setup()
end

defp ensure_setup(module \\ nil) do
unless is_nil(module), do: module = app_from_module(to_string(module))
unless File.exists?(cache_path(module)) do
File.mkdir_p(cache_path(module))
defp do_ensure_setup(cache_path) do
unless File.exists?(cache_path) do
File.mkdir_p(cache_path)
end
end
end
2 changes: 1 addition & 1 deletion lib/alkemist/query/paginate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule Alkemist.Query.Paginate do
"""

def run(query, params, opts \\ []) do
query = Turbo.Ecto.paginateq(query, params)
query = Turbo.Ecto.Builder.run(query, params)
pagination = Turbo.Ecto.Hooks.Paginate.get_paginate(query, params, opts)

{query, pagination}
Expand Down
8 changes: 4 additions & 4 deletions lib/alkemist/query/search.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ defmodule Alkemist.Query.Search do
@empty_values [nil, [], {}, [""], "", %{}]

def run(query, params) do
searchq(query, params) |> Turbo.Ecto.sortq(params)
searchq(query, params) |> Turbo.Ecto.Builder.run(params)
end

def searchq(query, params) do
params =
params
|> prepare_params(query)

Turbo.Ecto.searchq(query, params)
Turbo.Ecto.Builder.run(query, params)
end

def sortq(query, params) do
Turbo.Ecto.sortq(query, params)
Turbo.Ecto.Builder.run(query, params)
end

@doc """
prepares the params so we can better handle naive_datetime and datetime fields
right now this works not on associations
"""
def prepare_params(params, query) do
queryable = Turbo.Ecto.Utils.schema_from_query(query)
queryable = Turbo.Ecto.Builder.extract_schema(query)

search_params =
params
Expand Down
6 changes: 3 additions & 3 deletions lib/alkemist/templates/index.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
<%= if any?(@batch_actions) do %>
<div class="row mt-1">
<%= form_for @conn, "", [id: "batch-action-form"], fn f -> %>
<%= form_for @conn, "", [id: "batch-action-form"], fn _f -> %>

<% end %>
<div class="col-2 dropdown">
Expand All @@ -48,7 +48,7 @@
<table class="table index-table table-hover">
<thead>
<tr>
<%= for {field, _cb, opts} = column <- @columns do %>
<%= for {field, _cb, _opts} = column <- @columns do %>
<%= if field == :selectable_column do %>

<th class="selectable">
Expand All @@ -69,7 +69,7 @@
<td class="selectable">
<input type="checkbox" class="collection-selection" value="<%= row.id %>" >
</td>
<%= else %>
<% else %>
<td class="<%= opts.type %> <%= Slugger.slugify_downcase(opts.label) %>">
<%= if Map.has_key?(opts, :action) and not is_nil(opts.action) and not is_nil(Map.get(row, opts.assoc)) do %>
<a href="<%= resource_action_path(@conn, Map.fetch!(row, opts.assoc), opts.action) %>"><%= string_value(cb, row) %></a>
Expand Down
11 changes: 1 addition & 10 deletions lib/alkemist/views/form_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ defmodule Alkemist.FormView do
defp build_empty_form_template(type, form, {key, _opts} = field) do
assoc = case type do
:association -> Alkemist.Utils.get_association(form.data, key)
:embed ->
assoc = Alkemist.Utils.get_embed(form.data, key)
:embed -> Alkemist.Utils.get_embed(form.data, key)
end
case assoc do
%{cardinality: :many, queryable: queryable} ->
Expand Down Expand Up @@ -360,14 +359,6 @@ defmodule Alkemist.FormView do
|> String.replace("#{key}_0", "#{key}_$index")
|> String.replace("[#{key}][0]", "[#{key}][$index]")

%{cardinality: :many, related: related} ->
source = form.source

source = Map.put(source, :changes, Map.put(%{}, key, related.__struct__))
form = Map.put(form, :source, source)

Phoenix.HTML.safe_to_string(render_has_one_inputs(form, field, true))

_ ->
""
end
Expand Down
2 changes: 1 addition & 1 deletion lib/alkemist/views/search_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ defmodule Alkemist.SearchView do
select(form, field, collection, class: "form-control form-control-sm", prompt: "Choose...")
end

def input_field(form, field, :date, opts) do
def input_field(form, field, :date, _opts) do
to_field = String.replace(Atom.to_string(field), "gteq", "lteq") |> String.to_atom()
[
text_input(form, field, class: "form-control form-control-sm datepicker", placeholder: "From"),
Expand Down
2 changes: 1 addition & 1 deletion lib/alkemist/views/view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ defmodule AlkemistView do
@doc """
Create a link to the export action
"""
def export_action(conn, struct, assigns \\ []) do
def export_action(conn, struct, _assigns \\ []) do
query_params = get_default_link_params(conn)


Expand Down
15 changes: 11 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defmodule Alkemist.MixProject do
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),

# Hex
description: description(),
Expand Down Expand Up @@ -57,14 +58,14 @@ defmodule Alkemist.MixProject do
defp deps do
[
{:phoenix, "~> 1.3 or ~> 1.4"},
{:phoenix_ecto, "~> 3.6"},
{:phoenix_ecto, "~> 4.0"},
{:phoenix_html, "~> 2.10"},
{:ecto, "~> 2.2"},
{:ecto, "~> 3.0"},
{:inflex, "~> 1.10.0"},
{:atomic_map, "~> 0.9.3"},
{:csv, "~> 2.0"},
{:turbo_ecto, "~> 0.1.7"},
{:phoenix_mtm, "~> 0.5.1"},
{:turbo_ecto, git: "git@github.com:zven21/turbo_ecto.git"},
{:phoenix_mtm, "~> 1.0.0"},
# Test and dev
{:credo, "~> 0.10.0", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10.0", only: :test},
Expand Down Expand Up @@ -98,4 +99,10 @@ defmodule Alkemist.MixProject do
Provides some helper methods to build manager and admin applications quicker
"""
end

defp aliases do
[
test: ["ecto.create --quiet", "test"]
]
end
end
20 changes: 11 additions & 9 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"},
"credo": {:hex, :credo, "0.10.2", "03ad3a1eff79a16664ed42fc2975b5e5d0ce243d69318060c626c34720a49512", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
"csv": {:hex, :csv, "2.1.1", "a4c1a7c30d2151b6e4976cb2f52c0a1d49ec965afb737ed84a684bc4284d1627", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, repo: "hexpm", optional: false]}], "hexpm"},
"db_connection": {:hex, :db_connection, "1.1.3", "89b30ca1ef0a3b469b1c779579590688561d586694a3ce8792985d4d7e575a61", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
"decimal": {:hex, :decimal, "1.5.0", "b0433a36d0e2430e3d50291b1c65f53c37d56f83665b43d79963684865beab68", [:mix], [], "hexpm"},
"db_connection": {:hex, :db_connection, "2.0.3", "b4e8aa43c100e16f122ccd6798cd51c48c79fd391c39d411f42b3cd765daccb0", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm"},
"decimal": {:hex, :decimal, "1.6.0", "bfd84d90ff966e1f5d4370bdd3943432d8f65f07d3bab48001aebd7030590dcc", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.2.6", "b6da42b3831458d3ecc57314dff3051b080b9b2be88c2e5aa41cd642a5b044ed", [:mix], [], "hexpm"},
"ecto": {:hex, :ecto, "2.2.11", "4bb8f11718b72ba97a2696f65d247a379e739a0ecabf6a13ad1face79844791c", [:mix], [{:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: true]}, {:decimal, "~> 1.2", [hex: :decimal, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.8.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.13.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, repo: "hexpm", optional: true]}], "hexpm"},
"ecto": {:hex, :ecto, "3.0.5", "bf9329b56f781a67fdb19e92e6d9ed79c5c8b31d41653b79dafb7ceddfbe87e0", [:mix], [{:decimal, "~> 1.6", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"},
"ecto_sql": {:hex, :ecto_sql, "3.0.3", "dd17f2401a69bb2ec91d5564bd259ad0bc63ee32c2cb2e616d04f1559801dba6", [:mix], [{:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.0.4", [hex: :ecto, repo: "hexpm", optional: false]}, {:mariaex, "~> 0.9.1", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.2.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.18.4", "4406b8891cecf1352f49975c6d554e62e4341ceb41b9338949077b0d4a97b949", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"excoveralls": {:hex, :excoveralls, "0.10.2", "fb4abd5b8a1b9d52d35e1162e7e2ea8bfb84b47ae07c38d39aa8ce64be0b0794", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"},
"gettext": {:hex, :gettext, "0.16.0", "4a7e90408cef5f1bf57c5a39e2db8c372a906031cc9b1466e963101cb927dafc", [:mix], [], "hexpm"},
Expand All @@ -19,23 +20,24 @@
"inflex": {:hex, :inflex, "1.10.0", "8366a7696e70e1813aca102e61274addf85d99f4a072b2f9c7984054ea1b9d29", [:mix], [], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"},
"mime": {:hex, :mime, "1.3.0", "5e8d45a39e95c650900d03f897fbf99ae04f60ab1daa4a34c7a20a5151b7a5fe", [:mix], [], "hexpm"},
"mime": {:hex, :mime, "1.3.1", "30ce04ab3175b6ad0bdce0035cba77bba68b813d523d1aac73d9781b4d193cf8", [:mix], [], "hexpm"},
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"},
"mochiweb": {:hex, :mochiweb, "2.18.0", "eb55f1db3e6e960fac4e6db4e2db9ec3602cc9f30b86cd1481d56545c3145d2e", [:rebar3], [], "hexpm"},
"parallel_stream": {:hex, :parallel_stream, "1.0.6", "b967be2b23f0f6787fab7ed681b4c45a215a81481fb62b01a5b750fa8f30f76c", [:mix], [], "hexpm"},
"parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm"},
"phoenix": {:hex, :phoenix, "1.3.4", "aaa1b55e5523083a877bcbe9886d9ee180bf2c8754905323493c2ac325903dc5", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.3 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}, {:poison, "~> 2.2 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_ecto": {:hex, :phoenix_ecto, "3.6.0", "d65dbcedd6af568d8582dcd7da516c3051016bad51f9953e5337fea40bcd8a9d", [:mix], [{:ecto, "~> 2.2", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_html": {:hex, :phoenix_html, "2.12.0", "1fb3c2e48b4b66d75564d8d63df6d53655469216d6b553e7e14ced2b46f97622", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_mtm": {:hex, :phoenix_mtm, "0.5.1", "22a9b4ee16e3455bcef32e7408d2fa64d4f2b6d0c020c1e1efc896d09ce9a335", [:mix], [{:ecto, "~> 2.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.0.0", "c43117a136e7399ea04ecaac73f8f23ee0ffe3e07acfcb8062fe5f4c9f0f6531", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.9", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_html": {:hex, :phoenix_html, "2.13.0", "3bad10de5efb6c590f7aa5b316ad0d3faa054715414c9b562c410de4ffb885c5", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
"phoenix_mtm": {:hex, :phoenix_mtm, "1.0.0", "36a2292f84f0712aa4fa029cb6618d9388371d70951b0269bdf372df576aab56", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.1", "6668d787e602981f24f17a5fbb69cc98f8ab085114ebfac6cc36e10a90c8e93c", [:mix], [], "hexpm"},
"plug": {:hex, :plug, "1.7.1", "8516d565fb84a6a8b2ca722e74e2cd25ca0fc9d64f364ec9dbec09d33eb78ccd", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}], "hexpm"},
"plug_crypto": {:hex, :plug_crypto, "1.0.0", "18e49317d3fa343f24620ed22795ec29d4a5e602d52d1513ccea0b07d8ea7d4d", [:mix], [], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"},
"poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], [], "hexpm"},
"postgrex": {:hex, :postgrex, "0.13.5", "3d931aba29363e1443da167a4b12f06dcd171103c424de15e5f3fc2ba3e6d9c5", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 1.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm"},
"postgrex": {:hex, :postgrex, "0.14.1", "63247d4a5ad6b9de57a0bac5d807e1c32d41e39c04b8a4156a26c63bcd8a2e49", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.0", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm"},
"slugger": {:hex, :slugger, "0.3.0", "efc667ab99eee19a48913ccf3d038b1fb9f165fa4fbf093be898b8099e61b6ed", [:mix], [], "hexpm"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.4", "f0eafff810d2041e93f915ef59899c923f4568f4585904d010387ed74988e77b", [:make, :mix, :rebar3], [], "hexpm"},
"turbo_ecto": {:hex, :turbo_ecto, "0.1.7", "5265b20c0899a3b95713bcdc3111fb27a136ffed9e3829832f707a1fb76cd087", [:mix], [{:ecto, "~> 2.2", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm"},
"telemetry": {:hex, :telemetry, "0.2.0", "5b40caa3efe4deb30fb12d7cd8ed4f556f6d6bd15c374c2366772161311ce377", [:mix], [], "hexpm"},
"turbo_ecto": {:git, "git@github.com:zven21/turbo_ecto.git", "17b9933f6e7976590660bf92c8668fe01d245646", []},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm"},
}
2 changes: 1 addition & 1 deletion test/support/repo.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defmodule Alkemist.Repo do
use Ecto.Repo, otp_app: :alkemist
use Ecto.Repo, otp_app: :alkemist, adapter: Ecto.Adapters.Postgres
end