Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created November 3, 2018 18:58
Show Gist options
  • Save KamilLelonek/8dfeed632bab351d10b5b59995e534b1 to your computer and use it in GitHub Desktop.
Save KamilLelonek/8dfeed632bab351d10b5b59995e534b1 to your computer and use it in GitHub Desktop.
defmodule Util.Reset do
alias EventStore.{Config, Storage.Initializer}
def conn! do
{:ok, conn} = Config.parsed() |> Config.default_postgrex_opts() |> Postgrex.start_link()
conn
end
def do_reset!(conn) do
fn data ->
Initializer.reset!(conn)
data
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment